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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.