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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
PaulMac
Helper IV
Helper IV

Need Help Formatting Matrix Table

Hi

 

I have created a matrix table which lists Job Numbers along with a measure counting the occurances of the Job Numbers. I want to have it so that the Job Number can be expanded to show all the relevant Letter Numbers associated with that job.
This I have done, however when I expand the job number row the DAX value is showing on the Letter Number rows and is causing some confusion for users.
As per the example below, I would like for it to be, that I only see the DAX value on the Job Number row (Red), with the nested Letter Number (yellow) rows to show as blank instead of 3. I've been tinkering with this all week and struggling to find a usable solution. Posed my query to chatGPT and CoPilot, neither of which could find a workable solution.

PaulMac_0-1723198335245.png

Thanks for reading

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @PaulMac 
You can manipulate what to show by the hierarchy level with "Isinscope" function.
Like :

Ritaf1983_0-1723198973573.png

The pbix with the example is attached 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Thanks for your swift reply @Ritaf1983 

I did however find a solution to my problem, I needed to elaborate the DAX and use the SUMMARIZE function in order for the Total to show correctly for me.
My DAX ended up looking like this:

CountJobs_by_Volume = 
VAR countVol = 
    CALCULATE(
        COUNTA(Usage[JobNumber]),
        FILTER(
            Usage,
            Usage[JobNumber] = SELECTEDVALUE(Jobs_Letters_and_DAS[JobNumber])
        )
    )

VAR totalVol =
    SUMX(
        SUMMARIZE(
            Jobs_Letters_and_DAS, 
            Jobs_Letters_and_DAS[JobNumber],
            "JobCount", 
            CALCULATE(COUNTA(Usage[JobNumber]))
        ),
        [JobCount]
    )

RETURN
IF(
    ISINSCOPE(Jobs_Letters_and_DAS[Letter No]),
    BLANK(),
    IF(
        HASONEVALUE(Jobs_Letters_and_DAS[JobNumber]),
        countVol,
        totalVol
    )
)


Your help has been very much appreciated. 🙂

View solution in original post

7 REPLIES 7
Ritaf1983
Super User
Super User

Hi @PaulMac 
You can manipulate what to show by the hierarchy level with "Isinscope" function.
Like :

Ritaf1983_0-1723198973573.png

The pbix with the example is attached 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 
I have noticed that my Total row doesn't appear correct and is showing a much lower number than expected. I see on your example your Total appears un affected, can I ask how you achieved this?
Thanks
Paul

Hi @PaulMac 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks for your swift reply @Ritaf1983 

I did however find a solution to my problem, I needed to elaborate the DAX and use the SUMMARIZE function in order for the Total to show correctly for me.
My DAX ended up looking like this:

CountJobs_by_Volume = 
VAR countVol = 
    CALCULATE(
        COUNTA(Usage[JobNumber]),
        FILTER(
            Usage,
            Usage[JobNumber] = SELECTEDVALUE(Jobs_Letters_and_DAS[JobNumber])
        )
    )

VAR totalVol =
    SUMX(
        SUMMARIZE(
            Jobs_Letters_and_DAS, 
            Jobs_Letters_and_DAS[JobNumber],
            "JobCount", 
            CALCULATE(COUNTA(Usage[JobNumber]))
        ),
        [JobCount]
    )

RETURN
IF(
    ISINSCOPE(Jobs_Letters_and_DAS[Letter No]),
    BLANK(),
    IF(
        HASONEVALUE(Jobs_Letters_and_DAS[JobNumber]),
        countVol,
        totalVol
    )
)


Your help has been very much appreciated. 🙂

Great , it's my honor ♥️

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Amazing! Thank you @Ritaf1983 for saving my sanity

 

Paul

@PaulMac 
Happy to help 🙂

If previous post helped, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.