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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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