Forum Discussion
Matrix visual color conditional formatting
- 6 years ago
goalie_ change following measure
# of servers = COUNTROWS ( CALCULATETABLE( VALUES ( Amount[Server] ), ALLSELECTED ( Amount ) ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
goalie_ , Not sure I got it. You can create a color measure and use that with Fields option in conditional formatting
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
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
goalie_ I have a similar solution done a long time ago, see attached. In this, if values are different than it highlights whereas in your if the value is the same that highlights the row, you can change reverse logic in the Dax function and implement the solution in your model.
It is pretty straight forward, if you still run into an issue, let me know.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- goalie_6 years agoHelper III
Thank you so much, but I'm not there yet. I want the highlighting to apply to selected column values via a slicer. I think we're on the right track. So my question is how would I specify for specific column values that are narrowed down via a slicer?
For example, let's say I have more Rice Types(Jasmine, black, flaked, etc...) in addition to Brown short, white short, and white long. Now if I slice it to 3 of them, I only want the highlighting rules to only apply to the ones selected, not the entirety of the table, which is what it is currently doing.
- goalie_6 years agoHelper III
In terms of the example you showed me, if I had C2, S1, Server 2 with an amount of 200 and only selected Servers 1,2,3, the result is below:
It highlights the C2, S1 row because Server 4 still has a different value for it. For what I'm trying to do, I'd like it to be clear. Hopefully that makes more sense.
- parry2k6 years agoSuper User
goalie_ sure I will tweak the measure, I think that will do it. stay tuned
- parry2k6 years agoSuper User
goalie_ change following measure
# of servers = COUNTROWS ( CALCULATETABLE( VALUES ( Amount[Server] ), ALLSELECTED ( Amount ) ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡