The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
203 | |
82 | |
65 | |
48 | |
38 |