Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
ThomasWeppler
Impactful Individual
Impactful Individual

Only sum up a matrix when it is drilled down.

Hi BI community

I have build a matrix where the first level look at the customers and the next level looks at the assinments attached to each customer.

I want to see each assingmentID when I drill down and look at the assingments, but not when I look at the customers, since it confuses the end user.
To do this I have wrote this line in Dax that only shows the assingmentID when I look at a single assingment.

Dax Magic = IF(COUNT(Assignment[assignmentId]) <> 1, BLANK(), SELECTEDVALUE(Assignment[assignmentId]))

 

bi question.png

 

The first box shows how the assingmentsID is hidden when the number of assingment is diffrent from one on a customer (good)
The second box shows how I can see the assingmentID when I drill down. (Also good)
The third box shows that when a customer only have a single assingment attached to it I will still see the assingmentnumber even though I have not drilled down (NOT good)

Does anyone here know that how I can also hide the number when a customer only have a single assingment attached to it until I drill down?

All help is greatly appreciated.

1 REPLY 1
ThomasWeppler
Impactful Individual
Impactful Individual

After a some time on google I found a solution myself.
It seems like the best way to solve this problem is to use the IsInScope function.
If anyone else has a similar problem this was the best guide I found on the problem.
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

A moderator can close this topic.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.