Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello guys,
Please, I need your help to solve some strange result when I'm calculating a percentual ratio over two TotalYTD measures. Observe the value highlighted below:
As you can see, there is an absurd number as a result of ('Real YTD' / 'Plan YTD' - 1) calculation. In this situation, Plan YTD is zero but I've got this covered by using some 'IF' conditions. This is the measure for 'Var YTD %':
Those conditions are important to attend both Revenues and Expenses variation.
The measures for Real YTD and Plan YTD are:
Solved! Go to Solution.
@moliveira-GA , Please change order like
Switch( true(),
[TotRealYTD] = 0 && [TotPlanYTD] = 0, Blank(),
isblank([TotRealYTD]) && isblank([TotPlanYTD]) , blank() ,
isblank([TotRealYTD]) || isblank([TotPlanYTD]), 1,
[TotRealYTD] = 0 || [TotPlanYTD] = 0,1,
DIVIDE( [TotRealYTD] -[TotPlanYTD], [TotPlanYTD] )
)
Hello @amitchandak
thanks for your help! it really worked.
Allow me to say, it's a very clever alternative to the "IF", and I believe this solution will help me with other questions. Thanks again!
@moliveira-GA , Please change order like
Switch( true(),
[TotRealYTD] = 0 && [TotPlanYTD] = 0, Blank(),
isblank([TotRealYTD]) && isblank([TotPlanYTD]) , blank() ,
isblank([TotRealYTD]) || isblank([TotPlanYTD]), 1,
[TotRealYTD] = 0 || [TotPlanYTD] = 0,1,
DIVIDE( [TotRealYTD] -[TotPlanYTD], [TotPlanYTD] )
)
User | Count |
---|---|
50 | |
23 | |
18 | |
18 | |
14 |
User | Count |
---|---|
91 | |
84 | |
43 | |
26 | |
21 |