Forum Discussion
Conditional formatting via isinscope()
- Anonymous3 years ago
Hi Anonymous ,
What is your desired output? I'm a little confused. When we select the level 1, we can see level 2 and level 3. But when we choose level 3, Its upper level cannot be hidden.
If so, you can vote here: Microsoft Idea (powerbi.com)
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
I cannot reproduce the issue. Could you please provide some sample data without privacy information and desired output with more details.
How to Get Your Question Answered Quickly
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
Hi Anonymous ,
I posted a PBIX file on wetransfer: https://we.tl/t-9TvD36eFPP
So without the filter the matrix looks like this:After the filtering/button it should look like this: so based if a inscope() function matches, every hierachal level should be visible:
In this example based on the second hierachy the numbers are turned red.
- Anonymous3 years agoNot applicable
Hi Anonymous ,
There is nothing error with the formula.
MEASURE conditonalformatting = VAR varLevel2 = ( 1 / 100 ) VAR varLevel1 = ( 35 / 1000 ) RETURN IF ( ISINSCOPE ( 'Sample'[Level 3] ), BLANK (), IF ( ISINSCOPE ( 'Sample'[Level 2] ) && ( [Difference%] ) > varLevel2, "#ff2000", IF ( ISINSCOPE ( 'Sample'[Level 1] ) && ( [Difference%] ) > varLevel1, "#ff2000" ) ) )In your sample data, the varlevel11 value is 0.035(3.5%).
There is no data bigger than 3.5%.
I have change 35 to 25.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
Hi Anonymous,
There was nothing wrong with the formula. I was looking at a way where I can filter based on this formula.
So when 1 hierachy is matched, I want to see all the details from level 1 to level 3 of a certain country for example, NL.
So in this example hierachy level 2 is matched for the countries NL and DE. Therefore I want to see all the details on that level: