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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Date based conditional icons

I have a data like this

Capture.PNG

I want to show icons on table based on the dates. so up to 24th may 2022 I want to show yellow color icon and whenever the day 25th may 2022 come then I want to show green color icon and if date pass then I want to show red color icon. How to do this in power bi

1 ACCEPTED SOLUTION

@Anonymous ,

 

Switch(True(),

Max(Table[billing date])  <= date(2022,05,14), "Yellow",

Max(Table[billing date])  <= Max(Table[system date]) , "Green", //today() in case you need current date

// add other

)

 

Same way create icons or use any icon using unichar

icon = unichar(9898)

 

Use this measure and use conditional formatting using field value option

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , You need create a color measure and icon measure. For Icon measure you can use unichar of your choice

 

example

 

/////Arrow
Arrow =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)

 

 

https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

https://exceleratorbi.com.au/dax-unichar-function-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Actually I need icons based on billing date so upto 24th may 2022 I want to show it in yellow color only and whenever the system date matches to billing date then I want to show green and whenever system date pass billing date then i want to show red

@Anonymous ,

 

Switch(True(),

Max(Table[billing date])  <= date(2022,05,14), "Yellow",

Max(Table[billing date])  <= Max(Table[system date]) , "Green", //today() in case you need current date

// add other

)

 

Same way create icons or use any icon using unichar

icon = unichar(9898)

 

Use this measure and use conditional formatting using field value option

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors