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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply

Conditional Formatting With Icons in one field and word N/A in another

Hi There

 

Looking for some help please.

 

I have a table where the values are -1, 1 and 0.

 

In conditional formatting I want it to to show the following

 

-1 to show a 'X' symbol

1 to show a Tick symbol

0 to show text N/A

 

I can do conditional formatting for the cross and tick but cannot get the word N/A to show in the cells where there is a 0.

 

I've tried the below which works for the symbols and ive also tried doing in Cell Elements (icons)

 

^ Icons On Track For Reforecast Target Fix = SWITCH(TRUE(),
                                                Query1[On Track for Reforecast Target] = -1, "SymbolLow",
                                                Query1[On Track for Reforecast Target] = 1, "SymbolHigh",
                                            "N/A")
 
Does anyone know how to make this possible.
 
Many thanks
 
Kind regards
Karen
2 ACCEPTED SOLUTIONS
v-rongtiep-msft
Community Support
Community Support

Hi @KarenFingerhut ,

Please refer to my pbix file to see if it helps you.

vpollymsft_0-1675751531973.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

HI Polly

So sorry for late reply. I did resolve this by adding in a table with 

KarenFingerhut_0-1676272406663.png

 

And then did the following DAX 

IF('Icons For Year End Target 2'[Icon] = "Tick",UNICHAR(10003),'Icons For Year End Target 2'[Icon])
 
And additional dax for the conditional colour formatting 
 
IF('Icons For Year End Target 2'[Number]= 0 , "#646363",
                            IF('Icons For Year End Target 2'[Number]= -1 , "#D64060",
                            IF('Icons For Year End Target 2'[Number]= 1 , "#7ab929",
                            IF('Icons For Year End Target 2'[Number]= 2 , "#646363",
                            IF('Icons For Year End Target 2'[Number]= 3 , "#646363")))))
 
And got the following result which is exactly what I needed 🙂
KarenFingerhut_1-1676272554335.png

 

Once again thanks for your reply.

 

Kind regards

Karen

View solution in original post

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @KarenFingerhut ,

Please refer to my pbix file to see if it helps you.

vpollymsft_0-1675751531973.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

HI Polly

So sorry for late reply. I did resolve this by adding in a table with 

KarenFingerhut_0-1676272406663.png

 

And then did the following DAX 

IF('Icons For Year End Target 2'[Icon] = "Tick",UNICHAR(10003),'Icons For Year End Target 2'[Icon])
 
And additional dax for the conditional colour formatting 
 
IF('Icons For Year End Target 2'[Number]= 0 , "#646363",
                            IF('Icons For Year End Target 2'[Number]= -1 , "#D64060",
                            IF('Icons For Year End Target 2'[Number]= 1 , "#7ab929",
                            IF('Icons For Year End Target 2'[Number]= 2 , "#646363",
                            IF('Icons For Year End Target 2'[Number]= 3 , "#646363")))))
 
And got the following result which is exactly what I needed 🙂
KarenFingerhut_1-1676272554335.png

 

Once again thanks for your reply.

 

Kind regards

Karen

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.