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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Adding icons to table visual based on field value

Hi,

 

I have a table (See the pictures) where I have Period, KPI, and a value for that KPI of the KPI. I have created a table visual where there is Actual, Target, and Status. In order to calculate Actual, I used YTD average for Cost and Precision, and took the value of the last month for Revenue. I have also predefined targets stored in Target measure. Then I have created Status measure. If Actual is bigger than Target it shows upside triangle, and vice vera if Actual is less than Target. I can add Status (icons) in a seperate column. But I want to take icons next to Actual to the same column. Is there any way I can do that? I tried it through conditional formattting but could not do that.

 

Any help is appreciated!

 

Thanks in advance!

 

The measures: 

Actual = 
var Cost_ = CALCULATE(AVERAGE('Table'[Value]),DATESYTD('Table'[ Period]),FILTER('Table','Table'[KPI]="Cost"))
var Revenue_ = CALCULATE(MAX('Table'[Value]),FILTER('Table','Table'[ Period]=MAX('Table'[ Period])),'Table'[KPI]="Revenue")
var Precision_ = CALCULATE(AVERAGE('Table'[Value]),DATESYTD('Table'[ Period]),FILTER('Table','Table'[KPI]="Precision"))

Return SWITCH(MAX('Table'[KPI]),
"Revenue",Revenue_,"Cost", Cost_,"Precision",Precision_)
Target = 
var precision = 0.99
var cost = 50
var revenue = 300
RETURN  
SWITCH(MAX('Table'[KPI]),"Cost",cost,"Revenue",revenue, "Precision", precision)
Status = SWITCH(TRUE(),[Actual]>[Target], UNICHAR(9650),UNICHAR(9660))

 

DataData

 

Table visiualTable visiual

7 REPLIES 7
v-diye-msft
Community Support
Community Support

hi @Anonymous 

 

Did you set the icon layout as "left/Right of data" ?

You might check out these blog for more reference:

https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/ 

https://powerbi.tips/2019/07/icons-upon-icons/ 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Hi @v-diye-msft

 

Thanks for the links. Now I realize that I can do that by using SVG code. But I still wonder why it does not work when I add my "Status" measure (icons) through conditioanal formatting field value. I just get a space next to the data not the icon itself. I also choose the layout. 

 

3.PNG

@Anonymous  - I'm confused over the current ask here. It seemed like you had conditional formatting and icons working in the original post in a separate column. The method I proposed with UNICHAR, you would add the logic of which color icon to display to that code so you would choose whatever color icon you wanted as your UNICHAR, like:

 

VAR __char = IF([Sum] > 0,UNICHAR(1),UNICHAR(2))

RETURN

[Sum] & " " & __char

 

If you need SVG icons, I created a bunch of them here: https://community.powerbi.com/t5/Quick-Measures-Gallery/SVG-Multi-Shape-Multi-Color-Indicators/m-p/500486#M199

 

But, I've become confused over what you are trying to accomplish.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

If you want it in the same column you would have to do concatenation and use UNICHAR function.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler ,

 

Thanks for the reply. What do you mean by saying that I should do concatenation. Can you please give an example?

@Anonymous  - Sure, 

 

Measure = [Target] & " " & UNICHAR(9733)

 

Concatenation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler, That works fine, but now when I want to change the color of the icon (green for upward triangle, red for downward triangle), it will change the the color of the whole value.

 

I add color using conditional formatting, field value and choose by "Color" measure:

 

Color = SWITCH(TRUE(),[Actual]>[Target],"green","red")

  I could not find any way to change the color of the icon before concatenation. 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors