Forum

Variance and %Varia...
 
Notifications
Clear all

Variance and %Variance for DAX

3 Posts
2 Users
0 Reactions
84 Views
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Hi Team,

I tried to have variance between 2 tables using the following formula and it is ok with conditional formatting for Variance Act20 Vs Bud21.

Act20 Vs Bud21 = SUM(ActBudSumm4[Bud2021])-SUM(ActBudSumm4[Act2020])
 
However when I do % variance using the formula below and conditional formatting require a reference "Based on Field". I add "Act20 Vs Bud21" (please refer conditional formatting screen shot).
It is mathematically correct. but it is not correct for accounts. Please let me know of work around.(please refer to Variance and % Variance screen shot)
 
%Act20 Vs Bud21 = FORMAT( DIVIDE([Act20 Vs Bud21],SUM(ActBudSumm4[Act2020])),"0.0%")
 
and also
I have funny % for Corporate Recharge. Is there I can limit the percentage with if statement. let say if the %Act20 Vs Bud21 is less than -100%, I would like to see as -100%.
How can I do that in DAX for my highlighted formula above.
Thank you.
 
Best regards,
Aye
 
Posted : 22/05/2020 5:09 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Aye,

When you use the FORMAT function you're converting the measure result to text. Conditional Formatting can't apply formats based on numeric rules because they're text. You should use the formatting on the Measure Tools tab rather than the FORMAT function.

Yes, you can use IF. In the Contoso Power BI file I built in the course there is a measure called Act. Vs Bud. that uses IF.

Mynda

P.S. Please don't put percentage signs in file names as I can't open them because this character has a different meaning when used in a URL. As a general rule, you should never use special characters in any file names 😉

 
Posted : 22/05/2020 5:37 am
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Many thanks, Mynda.

I will avoid using characters in the file name. Thanks for the note.

regards,

Aye

 
Posted : 25/05/2020 9:43 pm
Share: