Forum Discussion
RobertoMonzon
2 years agoFrequent Visitor
Apply conditional formatting background color to subgroups in a matrix
I am working with my "data" table in power bi, I have a column called "department" where I have the department where my employees work, another called "worker" where I have the name of my employees, ...
- Anonymous2 years ago
Hi RobertoMonzon ,
Your idea is correct, to have both parent and child groups of the matrix show the number of conditions, just change apply to to values and totals.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RobertoMonzon
2 years agoFrequent Visitor
I make this code that almost work but the problem is that the principal ground still changing the conditional format
col =
VAR __minvalue=MINX(ALLSELECTED(data[department]),[avg])
VAR __maxvalue=MAXX(ALLSELECTED(data[department]),[avg])
VAR __minivalue=MINX(ALLSELECTED(data[worker]),[avg])
VAR __maxivalue=MAXX(ALLSELECTED(data[worker]),[avg])
VAR __sumvalue=data[avg]
RETURN
IF(NOT(ISINSCOPE('data'[worker])),
SWITCH(
TRUE(),
__sumvalue==__maxvalue,"Green",
__sumvalue==__minvalue,"Red",
"orange"
),
SWITCH(
TRUE(),
__sumvalue==__maxivalue,"Green",
__sumvalue==__minivalue,"Red",
"Orange"
)
)