Forum Discussion
Fill button colour based on field value
jitpbi , if you want to color in matrix/table/ display it is possible. But if you want in slicer it is not.
You can create a measure like give below and use that in conditional formatting with "field" option.
color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"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
You can check the custom filter for slicer
https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals
Hi,
Thank you for the solution.
I have used the below measure: