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.
Hi all, I 'm trying to create a measure with month but this shows a different value
The calculations are the same between two tables but when I turn the table to a card it changes. I don't understand why?
if you what you can find the file in the link
https://www.dropbox.com/sh/rrcmf97oupdb3fr/AAAEW6-mDPVOjc6k5WBKS90ba?dl=0
Here is my calculation. they are also very simple.
1- For targets : if the values are between +- target values it types 1
IF(AND('FORECAST BIAS'[BIAS]<MAX('Category Target'[ForecastBias Target]);'FORECAST BIAS'[BIAS]>(-MAX('Category Target'[ForecastBias Target])));1;0)
SUBCATTARGET = IF(AND('FORECAST BIAS'[BIAS]<MAX('SubcategoryTarget'[ForecastBias Target]);'FORECAST BIAS'[BIAS]>(-MAX('SubcategoryTarget'[ForecastBias Target])));1;0)
COUNTRY TARGET = IF(AND('FORECAST BIAS'[BIAS]<MAX('Country Target'[ForecastBias Target]);'FORECAST BIAS'[BIAS]>(-MAX('Country Target'[ForecastBias Target])));1;0)
2-Targets calcultion: this code for selection. It understands which filter is selected.
CALCULATION TARGET = IF(ISBLANK(SELECTEDVALUE('FORECAST BIAS'[Category ]))=FALSE();IF(ISBLANK(SELECTEDVALUE('FORECAST BIAS'[SubCategory]))=FALSE();'FORECAST BIAS'[SUBCATTARGET];'FORECAST BIAS'[CATEGORYTARGET]);'FORECAST BIAS'[COUNTRY TARGET])
3- ad the last one : IF calculation target is 1 show then show the month
Measure 2 = CALCULATE(DISTINCTCOUNT('FORECAST BIAS'[ Month ]);FILTER('FORECAST BIAS';'FORECAST BIAS'[CALCULATION TARGET]=1))
I want to count how many months' values are one.
Thank you for helping me
Best Regards
Sinan
Solved! Go to Solution.
try this for measure2:
Measure 2 = CALCULATE(DISTINCTCOUNT('FORECAST BIAS'[ Month ]), FILTER(ALL('FORECAST BIAS'[ Month ]),'FORECAST BIAS'[CALCULATION TARGET]=1))
try this for measure2:
Measure 2 = CALCULATE(DISTINCTCOUNT('FORECAST BIAS'[ Month ]), FILTER(ALL('FORECAST BIAS'[ Month ]),'FORECAST BIAS'[CALCULATION TARGET]=1))
Hi @themistoklis ,
dude, you are a life saver Thank you so much .That's what I need
Best regards
Sinan
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |