Reputation: 677
Let's say you had a table.
OrderNumber, OrderDate, City, & Sales
The Sales
field is given to you. No need to calculate it.
When you bring in this data into Power BI, say you want to analyze Sales
by City
(in a table format).
You can just straight away drag the two fields into the table.
No need to create a measure.
So now, suppose you created a measure, though.
Total Sales = Sum(Sales).
Is there any advantage to it, in this scenario?
Is it more efficient to use: City
, Total Sales
than it is to use: City
, Sales
Both display the same information.
Upvotes: 1
Views: 238
Reputation: 677
I was told that it is good to always create explicit measures, and that measures are more efficient. Weather right or wrong, I don't know, but from perspective of policy, it is a good idea, since measures do protect you from column name changes. In general, I think I can just make a rule of thumb to always define any measures that you want to report on explicitly.... BUT the answer above could also be correct... stack exchange doesn't let you choose multiple answers....
Upvotes: 0
Reputation: 40204
When you drag the field into the table, what Power BI does is create an implicit measure automatically based on its best guess of what aggregation (e.g. sum, max, count) it thinks you want.
So in this case, using an explicitly defined measure or an implicitly generated measure should perform the same since it is doing the same thing in the background, i.e., SUM(TableName[Sales])
.
It's generally considered best practice to use explicit measures.
You may be interested in this video discussing the differences.
Upvotes: 2