Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have created a matrix that has been conditional formatted to show the red and green icons. However, i have added a hiearchy to it and would like to show the red icon (if any) when collapsed.
As you can see below it is all green when collapsed:
However, when expaned there are red icons.
Does anyone know how I can show the red when it is collapsed too so we can see the error as soon as we go on the report?
Solved! Go to Solution.
Hi @AK1234 ,
Please try to another new measure as below base on the previous measure [Status_Switch]:
|
Status_Switch =
|
Best Regards
Hey @AK1234 ,
the values are calculated independent of the underlying hierarchy.
You can change that with a measure that behaves differently. But for that you have to give more information, what is the formula behind the KPIs? What does the table look like, how do the relationships look like.
Hi Denis,
Thank you for your response.
I have had to create the below measure using a FIRSTNONBLANK within a SWITCH statement. The results from each is returning a 1 and a 0 for the appropriate row using a IF statement. So if it is 1 then it si conditional formatted to show red and 0 to show green.
The Hierarchy looks like this:
I have tried to use isinscope but as i don't think it works with measure i have created, unless i am doing it wrong? (I am new to pbi so don't fully understand how everything works yet)
Hi @AK1234 ,
As check the measure you wrote, you are using the FIRSTNONBLANK function, this returns the first value in the column for which the expression has a non blank value. Please check my example below, Task Name T1 (Task aa1 and bb2 as 0, cc1 as 1). The first value of this task that is not blank is aa1(0). When you collapse the matrix, it will be with green Icon for Task NAME T1. Please check whether the data in your matrix has the same situation with mine...
Best Regards
Hi @Anonymous ,
thank you for your response.
yes my situation is the same as the one you described above. I found that without using FIRSTNONBLANK I was unable to use the hierarchy as it was throwing out an error when expanding.
Do you know of anyway I can show the value with the red icon (if there are any in the data) when collapsed and if not then show the green?
Hi @AK1234 ,
Please try to update the formula of your measure as below and check whether it can get your desired result:
Status_Switch =
VAR _char =
SWITCH (
FIRSTNONBLANK ( 'Task Names'[Task], 1 ),
"111 WH", [111 StatusID],
"111 RAW", [RAW 111 StatusID],
"EPR WH", [EPR Status ID],
"EPR RAW", [RAW EPR Status ID],
"AVAYA WH", [AVAYA StatusID],
"AVAYA RAW", [RAW AVAYA StatusID],
0
)
VAR _tab =
SUMMARIZE (
'Task Names',
'Task Names'[Task NAME],
'Task Names'[Task],
"_Count", _char
)
RETURN
IF ( SUMX ( _table, [_Count] ) >= 1, 1, 0 )
Best Regards
Hi @Anonymous ,
Thank you for your reponse, i really appreciate it.
However, it is still showing the green icon (0) when collapsed even though there are red (1) in some of the tasks.
Hi @AK1234 ,
Please try to another new measure as below base on the previous measure [Status_Switch]:
|
Status_Switch =
|
Best Regards
Hi @Anonymous ,
Thank you for your help! That worked!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.