Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi! I'd like to count the number of months over a target margin but the measure I wrote is giving me an error:
Months over Target Margin =
VAR Target =
DIVIDE(
[2022 Total Amount Converted] - [2022 Total Costs], [2022 Total Amount Converted]
)
return
CALCULATE(
COUNTA('Calendar'[Month]),
Target >= .5
)
I'm pretty new to DAX so any help is appreciated!
@Arete , Try like
Months over Target Margin =
VAR Target =
DIVIDE(
[2022 Total Amount Converted] - [2022 Total Costs], [2022 Total Amount Converted]
)
return
CALCULATE(
COUNTROWS(Filter(Values('Calendar'[Month]),Target >= .5))
)
Thanks for the reply! It looks like it's working but I need the discount count of months:
It should be 7 but instead, it says 13. Any suggestions?
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
111 | |
104 | |
103 | |
87 | |
61 |
User | Count |
---|---|
162 | |
132 | |
131 | |
95 | |
86 |