- Podcasts
- Microsoft Power BI Data Analyst Certification PrepCast
- Creating Calculated Columns
Creating Calculated Columns
Microsoft Power BI Data Analyst Certification PrepCast
- November 17, 2026
- 19 min
- Season 1, episode 35
About this episodeThis episode focuses on a practical PL-300 objective: Creating Calculated Columns. Calculated columns create row-level model values that…
Transcript
From the publisherThis transcript comes from the podcast’s own feed, as the publisher wrote it. It has no timestamps.
Creating Calculated Columns
The first clue is hidden in the phrase place in a slicer. The manager isn’t merely asking for one result to appear on a report. The requested categories must exist as values in a model column so that Power BI can use them as a field for filtering. That requirement points toward either an upstream column or a calculated column. It doesn’t automatically settle the choice, but it rules out choosing a measure simply because measures are familiar.
A calculated column belongs to the semantic model, which is the Power BI model containing tables, relationships, metadata, and calculations used by reports. You define the column with DAX, and Power BI evaluates its expression row by row during refresh. For the first sales row, the expression works with the values associated with that row. It then evaluates the next row, and continues across the table. This current-row environment is called row context.
This topic sits within the current Power BI Data Analyst skill area that includes identifying use cases for calculated columns and calculated tables, and creating calculated tables or columns. That doesn’t mean every derived value belongs in one of those structures. The practical judgment is narrower. Use a calculated column when the result genuinely needs to exist as a model column. If the requirement can be met by a measure or should be handled in an upstream transformation, one of those alternatives may be more appropriate.
If one row contains three units at ten dollars each, the expression evaluates with those two values for that row. On a row containing five units at eight dollars each, it evaluates with the second row’s values instead. The expression is the same, but its current row changes as Power BI proceeds through the table.
This is exactly why the request for a slicer field matters. A measure can provide a calculated result, but it isn’t a stored model column containing one category on every sales row. Choosing a measure for a requirement that specifically needs a slicer field fails to provide the required kind of model object, even if the measure produces a plausible value in a visual.
Both can leave you with a field that reports can use, but ownership differs. If the classification is fundamentally part of data preparation and can be produced reliably upstream, a Power Query transformation may be preferable. If the result must be defined as a model calculation and truly needs to exist as a model column, a calculated column is a defensible choice.
This distinction also gives you a useful troubleshooting boundary. If Order Size is a Power Query column and its values are wrong, inspect the query output and the transformation that creates it. If Order Size is a DAX calculated column, inspect the semantic model, the expression, the row-level inputs, and the refresh state. Changing a visual’s formatting won’t correct a value that was calculated incorrectly in the model. Likewise, rewriting model DAX won’t fix a source value that was already malformed before it arrived.
Now imagine another analyst creates the Order Size calculated column and sees Small, Medium, and Large in a slicer. At first glance, the work appears complete. But the presence of a field proves only that a field exists. It doesn’t prove that each row was classified correctly, that changed data will be reflected after refresh, or that report filtering produces the required consumer experience. Successful configuration is a starting point for validation, not evidence of correctness by itself.
Begin with known rows. Choose examples around the category boundaries defined by the business. If quantities below five should be Small, quantities from five through fourteen should be Medium, and higher quantities should be Large, check values on both sides of those boundaries. A quantity of four and a quantity of five should not receive the same label.
Compare the expected result with the actual stored category for each controlled row. If quantity four is labeled Small and quantity five is also labeled Small when five should begin Medium, the symptom points toward the column’s expression or the input value it receives. Reproduce the issue before changing anything. That gives you a stable failing condition and prevents unrelated edits from hiding the original problem.
Next, identify the layer that owns the behavior. The category is being created by DAX as a model column, so inspect that model calculation and the row values on which it depends. Don’t begin by changing report interactions, access permissions, or unrelated query steps merely because those settings are available. A broad search across every Power BI layer creates noise. The requirement and the mechanism tell you where to start.
After correcting the cause, test the row that failed and at least one row that already worked. If quantity five now becomes Medium, that’s useful evidence. If the change accidentally causes quantity four to become Medium too, the correction has created a new error. Retesting a normal case and an edge case helps demonstrate that the expression implements the intended categories rather than merely fixing one convenient example.
Refresh behavior deserves its own test because calculated columns are evaluated during refresh and stored in the model. Suppose an existing sales row changes from a quantity of four to a quantity of six in the refreshed data. Before refresh, the model may still hold the category previously calculated from four. After the relevant refresh completes, the calculated column should be evaluated from the current row data, and the observable category should match the rule for six. Looking only at the expression definition wouldn’t prove that the model contains the updated result.
Consider a request for a display value formed by combining two row attributes. If consumers need that combined result as a reusable field for slicing or filtering, a column may be appropriate. If it’s simply a preparation rule that should be standardized before the model receives the data, an upstream transformation may own it more cleanly. If the requested output is an aggregate that should respond to report selections, a measure is likely the closer candidate. The same word, calculation, doesn’t imply the same evaluation timing, storage, or use.
This is why there’s no universally correct feature choice just because Power BI permits a particular expression. The interface exposes several calculation options because they solve different requirements. A calculated column is not the advanced choice, and a measure is not automatically the efficient choice for every situation. Each is correct only when its behavior matches what the solution needs. Familiarity can make a feature feel safe, but familiarity doesn’t change the layer where that feature operates.
Refresh state tells you whether the stored result had an opportunity to update. Report interaction tells you whether the field behaves as required when someone uses it. If you skip directly to clicking the slicer, you may observe a failure without knowing whether its cause is stale data, incorrect classification, or report behavior.
The expected-versus-actual comparison keeps that investigation disciplined. Expected: an imported row with a quantity above the approved threshold receives Large after refresh and appears when Large is selected. Actual: the row receives Medium and appears under the wrong selection. With that statement, you can inspect the controlling calculation and its inputs. Without it, changing settings becomes guesswork, and a configuration that appears to improve one visual may leave the model logic wrong.
Performance and model design enter the decision through consequences, not through slogans. Because calculated column results are stored, unnecessary columns add to model size. Because they’re evaluated during refresh, they don’t behave like calculations requested dynamically by each report interaction. Because they exist as fields, they can satisfy requirements that measures can’t, such as providing values for a slicer or filter. Those three properties should be considered together rather than remembered as disconnected facts.
The same discipline protects the surrounding architecture. If a rule belongs upstream, reproducing it independently in several models could make its lifecycle harder to manage. If a report needs a responsive aggregate, storing row-level copies doesn’t provide the same behavior. If consumers need a reusable category field, offering only a measure changes usability. Choosing the proper layer preserves not only the immediate output but also how the model refreshes, how the report filters, and how the result is maintained.
For a certification scenario, watch for requirement words that reveal the needed object. A request to categorize each row, create a reusable field, or filter by derived values supports considering a calculated column. A request for a result that depends on the current report selection points you toward a different calculation choice.
A calculated column is the right choice when a result must exist for each row as a stored model field, especially when consumers need that field in a slicer or filter. Row context explains how Power BI evaluates the expression one row at a time during refresh, while storage explains both its usefulness and its model-size cost. If the result doesn’t need to be a model column, consider a measure or an upstream transformation instead.
Explain when a calculated column is justified even though it increases model storage. How would you test that its row-level result remains correct after refresh? Use the matching episode reference as the visual and technical handoff for practice with this concept. This lesson was produced by Bare Metal Cyber dot com.
