Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Icon Conditional Formating using DAX to find Value

Hello Community, 

 

I am trying to add the icon to my column SP data feed matrix [OVERALL_RATING] which have 4 value

Acceptable, Marginal, VALUE MISSING, Not Acceptable. 
The ending result, I would like to assign which of them with according color 
Circle green, Triangle Yello, Star Grey, Circle Yellow. 
Here is the sample of the data in Power BI. and the ending result that i wanted 
 
Here is my attempted DAX code 
 
Icon Set Measure =
SWITCH(
TRUE(),
'SP data feed matrix'[OVERALL_RATING] = Acceptable, "circle cx=’50’ cy=’50’ r=’40’ stroke=’green’ stroke-width=’4′ fill=’green’ /",
'SP data feed matrix'[OVERALL_RATING] = Marginal, "circle cx=’50’ cy=’50’ r=’40’ stroke=’yellow’ stroke-width=’4′ fill=’yellow’ /",
'SP data feed matrix'[OVERALL_RATING] = "VALUE MISSING", "circle cx=’50’ cy=’50’ r=’40’ stroke=’red’ stroke-width=’4′ fill=’red’ /",
'SP data feed matrix'[OVERALL_RATING] = "Not Acceptable", "circle cx=’50’ cy=’50’ r=’40’ stroke=’purple’ stroke-width=’4′ fill=’purple’ /",
"circle cx=’50’ cy=’50’ r=’40’ stroke=’white’ stroke-width=’4′ fill=’white’ /"
)

3 Replies