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
Anonymous
Not applicable

Change Row totals for matrix based on the drill down

Hello all, good morning.

 

Wanted to know how can I change the value of a measure based on if the matrix is opened into the lowest category or if it is showing as all summed up.

 

Right now it shows like this:

Pedro_Okazaki_0-1652186407295.png

 

What I need is, the column Service Status (All Invoices Table) should be the Overall Status for the first row and for each category, it should show the status for the category (Service Invoice Status).

 

I tried using hasonevalue but id did not work,

Service Status (All Invoices Table) =
IF(HASONEVALUE('All Invoices Table'[Service Invoice Status]),LASTNONBLANK('All Invoices Table'[Service Invoice Status],'All Invoices Table'[Service Invoice Status]),LASTNONBLANK('All Invoices Table'[Overall Status],'All Invoices Table'[Overall Status]))

Is this possible?

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Anonymous the function you need is: ISINSCOPE.
Check out this tutorial:
https://www.youtube.com/watch?v=1tdufLz7_0U
and then this video for distinguishing HASONEVALUE from ISINSCOPE.
https://www.youtube.com/watch?v=8UNNo233eFc


2022-05-09 22_36_04-Power BI Workspace Datasets License Permissions - Microsoft Power BI Community.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png  SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

View solution in original post

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@Anonymous the function you need is: ISINSCOPE.
Check out this tutorial:
https://www.youtube.com/watch?v=1tdufLz7_0U
and then this video for distinguishing HASONEVALUE from ISINSCOPE.
https://www.youtube.com/watch?v=8UNNo233eFc


2022-05-09 22_36_04-Power BI Workspace Datasets License Permissions - Microsoft Power BI Community.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png  SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Anonymous
Not applicable

Thank you very much, it worked!

 

Just writing down if anyone else needs this for reference, the below was my final dax measure:

 

Service Status (All Invoices Table) =


SWITCH(TRUE(),ISINSCOPE('All Invoices Table'[Service]),LASTNONBLANK('All Invoices Table'[Service Invoice Status],'All Invoices Table'[Service Invoice Status]),ISINSCOPE('All Invoices Table'[Release Reference]),LASTNONBLANK('All Invoices Table'[Overall Status],'All Invoices Table'[Overall Status]))

 

@Anonymous my pleasure 🙂
I just saw that the link for the other video slipped so I added it now to the message.

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.