Help on implicit measure vs explicit measure
Hi
I have a misunderstanding concerning the difference between implicit and explicit measures
When I read the Power Bi documentations it is mentionned that you will have better flexibility with explicit measures (because you can write whatever you want in DAX).
But i am unable to find an example showing the advantages of an explicit measure versus an implicit measure
In the example below, I am looking for the number of Female having a weight < 80 Kg
So it’s possible to do it with an explicit measure like this :
NbGenderFPoids =
CALCULATE(
COUNTROWS(Student),
FILTER(
Student,
Student[Gender] = "F" && Student[Weight (Kg)] < 80
)
)
But it’s also possible to do it with an implicit search using the advanced filtering :
Is anybody can give me a goog example of something which is possible with an explicit measure and not possible with an implicit measure?
Thanks
- Anonymous2 years ago
Hi jip34 ,
Implicit measures are created automatically when you drag a field into the Values area of a visualization. Power BI creates a default aggregation like sum, count, average, etc., based on the data type of the field. These are quick and easy to use but offer limited flexibility.
Explicit measures, on the other hand, are created by writing a DAX formula. They provide greater flexibility and control over the calculation. Here are some advantages of explicit measures:
1. Complex Logic: Explicit measures allow you to incorporate complex business logic that cannot be achieved with simple aggregations.
2. Reusability: Once created, explicit measures can be reused across different reports and visualizations without the need to recreate the logic.
3. Performance: Explicit measures can be optimized for performance, especially in large datasets.
4. Consistency: Ensures consistent calculations across your reports, as the DAX formula is centrally managed.
Here's an example where an explicit measure is necessary:
Scenario: You want to calculate the year-over-year growth percentage for sales. This requires a comparison between sales in the current year and the previous year.
Explicit Measure DAX Formula:
Sales YoY Growth % = VAR CurrentYearSales = CALCULATE(SUM(Sales[Amount]), Sales[Year] = YEAR(TODAY())) VAR PreviousYearSales = CALCULATE(SUM(Sales[Amount]), Sales[Year] = YEAR(TODAY()) - 1) RETURN IF( NOT ISBLANK(PreviousYearSales), (CurrentYearSales - PreviousYearSales) / PreviousYearSales, BLANK() )This calculation cannot be achieved with an implicit measure because it involves conditional logic and time intelligence functions that are not available in the default aggregations.
To summarize, while implicit measures are quick and easy for simple aggregations, explicit measures are essential when you need to perform more complex calculations or when you want to ensure consistency and optimize performance across your reports.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.