Forum Discussion
animebuff
1 year agoHelper I
DAX issue
requirement: left side visual is what by default we get in PBI what I need is right side visual but the values of all region should not be 0.31 rather apac - 1 europe - 0.5 la - 0.5 af...
- Anonymous1 year ago
Hi wini_R
Please try this measure:
MEASURE = VAR _currentRegion = SELECTEDVALUE ( 's rate'[region] ) VAR _ifdenominator = COUNTROWS ( SUMMARIZE ( FILTER ( ALLSELECTED ( 's rate' ), 's rate'[region] = _currentRegion && 's rate'[inclusion flag] = "n" ), 's rate'[mk], 's rate'[region] ) ) VAR _outcome = CALCULATE ( COUNT ( 'S rate'[success] ), 'S rate'[inclusion flag] = "Y" ) / COUNT ( 'S rate'[success] ) RETURN IF ( _outcome <> BLANK (), _outcome, IF ( _ifdenominator <> 1, 1, 0 ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
animebuff
1 year agoHelper I
if I try ISBLANK(num) && ISBLANK(den),1 as one condition of switch statement which is my actual ask
then I get 1 for the months that doesn't even have data, for example if my month columns has extra month like jan of 25, even if there is no data, i still will get 1 by logic
that will be wrong right?
this logic works when under my region drill down but for month it will show wrong values