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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ThomasWeppler
Skilled Sharer
Skilled Sharer

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
Skilled Sharer
Skilled Sharer

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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