When using Power BI, what is the main difference in when calculated columns and measures perform their calculations?
Think about when the data is stored versus when it is calculated on the fly.
Calculated columns are computed once when the data is loaded or refreshed and stored in the model. Measures calculate results dynamically based on user interactions like filters or slicers.
Given a Sales table with columns: Product, Quantity, and Price, and a measure defined as Total Sales = SUMX(Sales, Sales[Quantity] * Sales[Price]), what will be the result of Total Sales when a filter is applied to show only Product = 'A'?
Measures respect filters applied in the report visuals.
Measures calculate results based on the current filter context, so Total Sales will sum Quantity * Price only for Product 'A'.
You want to create a new column that categorizes sales as 'High' if the total sales amount exceeds 1000, otherwise 'Low'. The categorization should be available for each row in the Sales table. Which option is best?
Think about whether the categorization needs to be stored per row or calculated dynamically.
Since the categorization is per row, a calculated column using row-level values (Quantity * Price) is appropriate. Measures aggregate data and cannot create row-level categories.
Consider this measure:Average Price = AVERAGE(Sales[Price])
When used in a report with Product filter, it returns the average price for all products, ignoring the filter. What is the likely cause?
Check if the measure code includes functions that override filters.
If the measure uses ALL(Sales) or similar, it removes filters, causing the average to ignore the product filter.
You have a calculated column 'Profit Category' with values 'High', 'Medium', 'Low' per row, and a measure 'Total Profit' that sums profit dynamically. You want to show how total profit varies by profit category in a report. Which visualization is best?
Think about how to compare categories with aggregated values visually.
A stacked bar chart effectively shows total profit by profit category, combining the categorical column and measure aggregation.