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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
subhendude
Microsoft Employee
Microsoft Employee

Showing icon based on conditional formatting while comparing with the previous day data in a matrix

Hi,

I want to visualize the sales data with an indicative icon. The data looks like below

subhendude_0-1715192759095.png

I want to visualize the data in the following format in a matrix table

subhendude_1-1715192802796.png

I am aware that the icons can be added using the conditional formatting. However I'm unable to set the rule such that it compares the data with the previous day and show the icon(red down, green up). Please note I will sort the column in descending order in the matrix table to bring 4th May in first olumn followed by 3rd, 2nd and 1st.

 

Any idea how can I visualize the data in this way?

 

Thanks 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @subhendude 

 

Thanks for the reply from @amitchandak , please allow me to provide another insight:

 

Create a calculated column as follow

Column = 
VAR _earlier = 'Table'[Date]
VAR _earliersales = CALCULATE(SUM('Table'[Sales]), FILTER(ALLEXCEPT('Table', 'Table'[Items]), _earlier = [Date] + 1))
RETURN
[Sales] - _earliersales

 

vxuxinyimsft_0-1715234701349.png

 

vxuxinyimsft_1-1715234759719.png

 

Output:

vxuxinyimsft_2-1715234790955.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @subhendude 

 

Thanks for the reply from @amitchandak , please allow me to provide another insight:

 

Create a calculated column as follow

Column = 
VAR _earlier = 'Table'[Date]
VAR _earliersales = CALCULATE(SUM('Table'[Sales]), FILTER(ALLEXCEPT('Table', 'Table'[Items]), _earlier = [Date] + 1))
RETURN
[Sales] - _earliersales

 

vxuxinyimsft_0-1715234701349.png

 

vxuxinyimsft_1-1715234759719.png

 

Output:

vxuxinyimsft_2-1715234790955.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Absolutely fantastic @Anonymous 

amitchandak
Super User
Super User

@subhendude , You can do this using measure with unichar icons, but those will measures and need use as another measure in table 

 

 

/////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 , to be used in conditional formatting using field value option
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/

 

UNICHAR - Tool for Custom Icon Formatting: https://www.youtube.com/watch?v=veCtfP8IhbI&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=50

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

@amitchandak thanks for the pointers. I would prefer to use the _change in the condition formatting and render the icon based on the rules.

 

I am unable to figure out [Net Sales YTD] and [Net Sales LYTD] measures based on my data provided below. How do I calcuclate them?

subhendude_0-1715222791005.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.