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

DAX help for Conditional Formatting

Hi All,

 

Can someone help in correcting the below DAX.

I am trying to add conditional formatting based on the below DAX which has different Groups and has to meet 2 different conditions.

It's working but it applies only for MS SL group.

Color =
SWITCH (SELECTEDVALUE(Scorecard[Group]), "ACCELERATE","Innovate & Build","Market Segment","Protect",
SWITCH( TRUE(),SUM(Scorecard[Total Score])>50,"ColoredArrowDown",
Sum(Scorecard[Total Score])>40,"ColoredArrowRight",
"ColoredArrowUp"),
"Industry","MS SL", SWITCH( TRUE(),SUM(Scorecard[Total Score])>40,"ColoredArrowDown",
Sum(Scorecard[Total Score])>32,"ColoredArrowRight",
"ColoredArrowUp"))
 
RanjanThammaiah_0-1645687093253.png

 

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

HI @RanjanThammaiah ,


Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

Samarth_18
Community Champion
Community Champion

Hi @RanjanThammaiah ,

 

Please try this:-

Color =
SWITCH (
    SELECTEDVALUE ( Scorecard[Group] ),
    "ACCELERATE" || "Innovate & Build"
        || "Market Segment"
        || "Protect",
        SWITCH (
            TRUE (),
            SUM ( Scorecard[Total Score] ) > 50, "ColoredArrowDown",
            SUM ( Scorecard[Total Score] ) > 40, "ColoredArrowRight",
            "ColoredArrowUp"
        ),
    "Industry" || "MS SL",
        SWITCH (
            TRUE (),
            SUM ( Scorecard[Total Score] ) > 40, "ColoredArrowDown",
            SUM ( Scorecard[Total Score] ) > 32, "ColoredArrowRight",
            "ColoredArrowUp"
        )
)

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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.