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
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
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.

Top Solution Authors