cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User
Super User

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors