Forum Discussion
abukapsoun
Post Patron
5 years agohighlight cell value based on color
Hi I have a table as visual in powerBI. i would like to apply some colors if a cell value in a certain column equals to something. for example if cell value = 2 then highglihgt the cell with re...
- 5 years ago
You have to create a measure and use that measure in the field format option.
Example:
DAX measure
Color = var _cellvalue= SELECTEDVALUE('Table'[LastTransaction]) var _color= IF(_cellvalue="No","#198c19","#a500ff") return _colorAttaching the pbix file for your reference.
nandukrishnavs
Community Champion
5 years ago
You have to create a measure and use that measure in the field format option.
Example:
DAX measure
Color =
var _cellvalue= SELECTEDVALUE('Table'[LastTransaction])
var _color= IF(_cellvalue="No","#198c19","#a500ff")
return _color
Attaching the pbix file for your reference.
SweetsMum
3 years agoRegular Visitor
Hi,
Thanks for your solution.
I am trying to use your solution but it is failed when I want to select the measure "color".
I am using one dataset for my visual. Is it the reason?
It is not allowed me to select it.