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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

overdue/on track dates color coding conditional formatting

 

Hi Experts, 

 

I would like to create a conditional formatting icons to the below 'Meeting Schedule Deadline Status' column.

 

The conditions would be:

  • Green = date < today
  • Red = date > today
Meeting Schedule DeadlineMeeting Schedule Deadline Status
6/5/2021icon red
7/19/2021icon green
7/5/2021icon red

 

Could you please advise what would be the simpliest way to write code for this? Thanks so much for your help!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , You can create icon measure and color measure and add an icon as the new value and do conditional formatting on that using field value

 

Arrow =
var _change =Max([Meeting Schedule Deadline]) >today()
return
if (_change, UNICHAR(9650),UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =Max([Meeting Schedule Deadline]) >today()
return
if (_change, "green","red"
)

View solution in original post

V-pazhen-msft
Community Support
Community Support

@Anonymous 
There is already icon feature in Power BI. Right click the field and select icon, you may refer to the link:

 

Conditional Formatting Using Icons In Power BI - Excelerator BI

Vpazhenmsft_0-1626748304971.png

 

And for UNICHAR() code, please refer to:

DAX UNICHAR Function in Power BI - Excelerator BI

Basic Latin — ✔️ ❤️ ★ Unicode Character Table (unicode-table.com)

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
V-pazhen-msft
Community Support
Community Support

@Anonymous 
There is already icon feature in Power BI. Right click the field and select icon, you may refer to the link:

 

Conditional Formatting Using Icons In Power BI - Excelerator BI

Vpazhenmsft_0-1626748304971.png

 

And for UNICHAR() code, please refer to:

DAX UNICHAR Function in Power BI - Excelerator BI

Basic Latin — ✔️ ❤️ ★ Unicode Character Table (unicode-table.com)

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , You can create icon measure and color measure and add an icon as the new value and do conditional formatting on that using field value

 

Arrow =
var _change =Max([Meeting Schedule Deadline]) >today()
return
if (_change, UNICHAR(9650),UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =Max([Meeting Schedule Deadline]) >today()
return
if (_change, "green","red"
)

Anonymous
Not applicable

@amitchandak 

Thank you! Could you please advise if I should change 'arrow' into my own data name?

Anonymous
Not applicable

@amitchandak Got it. Is it possible to create one icon measure with colors? 

The conditions would be:

= date < today

= date > today

Meeting Schedule DeadlineMeeting Schedule Deadline Status
6/5/2021
7/19/2021
7/5/2021

 

Could you please advise and let me know if the below coding is accurate for this? Thanks so much for your help.

 

Arrow =
var _change =Max([Meeting Schedule Deadline]) >today()
return
if (_change, UNICHAR(11044), "green","red"
)

Anonymous
Not applicable

@amitchandak Could you please advise? Thanks so much for your help 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.