Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have an unresolved case, I want to make measures if the selected month slicer is only 1 month using the sum formula, but if the selected one is more than 1 month then use the average formula. what formula does this use?
Solved! Go to Solution.
Hi there,
Does the following work for you?
SampleMeasure =
VAR SelectedMonth =
SELECTEDVALUE ( SampleData[Date] )
RETURN
IF (
NOT ( ISBLANK ( SelectedMonth ) ),
SUM ( SampleData[Val] ),
AVERAGE ( SampleData[Val] )
)
With one value selected
With more than one value selected
Hi there,
Does the following work for you?
SampleMeasure =
VAR SelectedMonth =
SELECTEDVALUE ( SampleData[Date] )
RETURN
IF (
NOT ( ISBLANK ( SelectedMonth ) ),
SUM ( SampleData[Val] ),
AVERAGE ( SampleData[Val] )
)
With one value selected
With more than one value selected
Thank you very helpful
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |