cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors