Forum Discussion
jitpbi
5 years agoPost Patron
additional condition in the dax code
Hi, In one of my recent question i missed one condition addition to detail mentioned in this post. https://community.powerbi.com/t5/Desktop/show-different-colours-on-matrix-visual-based-on-fault...
- 5 years ago
Hi jitpbi ,
Sorry to reply late. Try to change the expression like so:
VAR tab = FILTER ( 'Table', TIME ( HOUR ( 'Table'[DateTime] ), MINUTE ( 'Table'[DateTime] ), SECOND ( 'Table'[DateTime] ) ) >= TIME ( 9, 30, 0 ) && TIME ( HOUR ( 'Table'[DateTime] ), MINUTE ( 'Table'[DateTime] ), SECOND ( 'Table'[DateTime] ) ) <= TIME ( 17, 30, 0 ) && 'Table'[Count of Anomaly] = 1 ----------added )Or you can add "[Count of Anomaly] = 1" at each var count like so:
VAR currentcount = COUNTROWS ( FILTER ( tab, DATE(YEAR([DateTime]),MONTH([DateTime]),DAY([DateTime])) = TODAY () ) && [Count of Anomaly] = 1 )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
5 years agoSuper User
jitpbi , I think above one will disply a unichar in each row.
You can do conditional formatting using color measure with "field Value" option
Color = if([Actual] > 0, "grey","white")
refer for steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values