Forum Discussion
Icon Conditional Formating using DAX to find Value
- 6 years ago
Hi Anonymous
I noticed that you didn't add the "" to include the text Acceptable,Marginal...in the dax expression.
Here's icon formatting post probably could be your reference:
https://community.powerbi.com/t5/Desktop/Icons-Color-formatting/m-p/747856
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
If the problem still exists, Would you mind kindly share your dummy pbix? please make sure you've removed the confidential info before.I'd like to check it further.
In the format option of matrix visual, you have an option for icons under conditional formatting. Choose that and check advance option, if that can help.
Or refer
https://community.powerbi.com/t5/Desktop/Icons-Color-formatting/td-p/747856
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
- Anonymous6 years agoNot applicable
amitchandak Thank you so much for your reply however I am trying to do conditional formatting using a text instead of whole number, I tried to copy exact the code and only change the color format but it will give me trouble.
Here is my updated DAX it have the error code "The syntax for 'data' is incorrect"
OVERALL_RATING icon =SWITCH (TRUE (),'SP data feed matrix'[OVERALL_RATING] = Acceptable , "data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40' stroke='purple' stroke-width='4' fill='purple' /> </svg>",'SP data feed matrix'[OVERALL_RATING]= Marginal, "data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='dark green' />'SP data feed matrix'[OVERALL_RATING]= "VALUE MISSING", "data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='dark green' />'SP data feed matrix'[OVERALL_RATING]= "Not Acceptable", "data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='dark green' /></svg>",)- v-diye-msft6 years agoCommunity Support
Hi Anonymous
I noticed that you didn't add the "" to include the text Acceptable,Marginal...in the dax expression.
Here's icon formatting post probably could be your reference:
https://community.powerbi.com/t5/Desktop/Icons-Color-formatting/m-p/747856
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
If the problem still exists, Would you mind kindly share your dummy pbix? please make sure you've removed the confidential info before.I'd like to check it further.