Glenisa Tumbaga
Member
Members
Forum Posts: 6
Member Since:
June 27, 2022
June 27, 2022
Offline
Hello,
I am currently trying to apply some conditional formatting on my powerbi dashboard. However, it doesn't seem like it's accepting negative percentage when I go through the 'conditional formatting' option. So what I have done so far is I wrote a DAX formula which consists of 'if' statements.
So what I would like to happen is:
anything is at 0 variance or higher = green
within 5% of goal = yellow
below 5% of goal = red
So I wrote a Dax - then reference this DAX formula to apply a conditional formatting.
CF =
IF(
[Variance 1(%)] < -0.05, 1,
IF(
[Variance 1(%)] <-.04, 2,
IF(
[Variance 1(%)] >= 0,
3)))
Specifically for the second formula - I need numbers mark as yellow if it's between certain numbers. So basically between -0.5% and 0. I keep getting errors
Philip Treacy
Admin
Forum Posts: 1619
Member Since:
October 5, 2010
October 5, 2010
Offline
Hi Glenisa,
If you supplied your file that would help to see your measure and data, but without it I can only give an example of this formatting.
The DAX to create the colours for the CF can be this
Variance 1(%) = VAR _val = MAX('DataTable'[Value]) RETURN SWITCH ( TRUE(), _val >= 0 , "Green", _val >= -0.05 , "Yellow", "Red" )
Which gives this
Check my attached file to see the data and code I've used.
Regards
Phil
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1944
SunnyKow: 1432
Anders Sehlstedt: 956
Purfleet: 415
Hans Hallebeek: 377
Frans Visser: 351
David_Ng: 318
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Techia Braveboy
Charles Buchanan
Tiago Braga
Rehan Baig
Fred HORVATH
Silke Schmidt
Stuart Barr
Amelia Nolte
David Wier
T P Collins
Forum Stats:
Groups: 3
Forums: 25
Topics: 7154
Posts: 31382
Member Stats:
Guest Posters: 50
Members: 34655
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —