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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Louis66
Resolver I
Resolver I

Problem with SWITCH to change colors

Hello,

 

I try to change the color using a measure, but without much success. Basically, my condition does not work :

 

Louis66_1-1666220457148.png

 

Normally, the "Sugar" should show in Red... but everything shows in Orange.

 

Can someone help me ?

 

Regards,

 

Louis

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Louis66 ,

 

This issue has been submitted internally.

Internal ICM ID: 343098936 

Please be patient to wait for fixing. If there is any news, I will update it here.

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-jianboli-msft
Community Support
Community Support

Hi @Louis66 ,

 

This issue has been submitted internally.

Internal ICM ID: 343098936 

Please be patient to wait for fixing. If there is any news, I will update it here.

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jayee
Responsive Resident
Responsive Resident

Hi @Louis66 ,

 

try below DAX Measure

colour =
SWITCH (
SELECTEDVALUE ( 'Cookie Types'[Cookie Type] ),
"Sugar", "Red",
"Orange"
)

Hello,

 

Unfortunately this DAX Measure does not work either - please see this screenshot :

Louis66_0-1666260287305.png

 

Louis

lukiz84
Memorable Member
Memorable Member

?! that's the same as the IF statement.

lukiz84
Memorable Member
Memorable Member

Just for testing purposes, can you add your Colour measure to the matrix next to Cookie Type and see if it returns Red/Orange?

I tried it, but no success either

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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