Forum Discussion
LUCASM
1 year agoHelper IV
Conditional formatting
I am trying to set a formatting rule where, IF my product value is < the selected product value then Background colour = PINK, if My Product value > the selected product value then Background colour ...
Jai-Rathinavel
1 year agoSuper User
LUCASM Create a disconnected calculated table with the below dax and pull the brand column in a slicer with single selection and paste the format measure below
1. Create a calculated Table ('Brand Slicer') with below dax and pull the column in a slicer
Brand Slicer = VALUES(Table[Brand])
2. Copy paste below format measure and apply conditional formatting
Conditional Format =
var selected = CALCULATE(SUM(Table[Value]),Table[Brand] = SELECTEDVALUE('Brand Slicer'[Brand]))
var my_product = SUM(Table[Value])
RETURN
SWITCH(TRUE(),
my_product < selected , "Pink",
my_product > selected , "Light Green")
Did I answer your question ? Please accept this post as a solution.
Thanks,
Jai