Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
binayjethwa
Helper IV
Helper IV

How to Refer a Calculated column in A Measure

Hi ,

 

I have the following requirement , where i need to change font color based on conditions.

I have Performance as my calculated column.

 

I am not getting actual result based on below measure. Is there any way we can achieve this. I tried VALUES also , still not working. Please help

 
Overall_Color_BLs =
VAR Overall= SELECTEDVALUE(All_Bls_Fct[OverallPerformance_New])

return
SWITCH(
    TRUE(),
    overall>=0.95,"#F34E4E",
    overall>=0.85 && [overall] <0.95,"#E7A76C",
    [overall]<0.85,"#5BA35F")
3 REPLIES 3
ADPowerBI1
Responsive Resident
Responsive Resident

Overall_Color_BLs = VAR Overall= SUM(All_Bls_Fct[OverallPerformance_New])

return SWITCH( TRUE(), overall>=0.95,"#F34E4E", overall>=0.85 && overall<0.95,"#E7A76C", overall<0.85,"#5BA35F")

Sorr, try this instead! added some extra brackets in the last one. 

If it works let me know and accept as solution if you'd be so kind!
Good luck! 🙂

ADPowerBI1
Responsive Resident
Responsive Resident

Overall_Color_BLs =
VAR OverallSUM(All_Bls_Fct[OverallPerformance_New])

 

return
SWITCH(
    TRUE(),
    overall>=0.95,"#F34E4E",
    overall>=0.85 && [overall] <0.95,"#E7A76C",
    [overall]<0.85,"#5BA35F")

Give this a go 🙂 

If not, make sure that the column "OverallPerformance_New" is of numeric data type and contains valid numbers.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.