Forum Discussion
Showing icon based on conditional formatting while comparing with the previous day data in a matrix
- Anonymous2 years ago
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] - _earliersalesOutput:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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
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?