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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
flushedpeach
Regular Visitor

Creating Unique Subtotal for Power BI Matrix Visualization but Some Rows not Showing Value - Help!

I have a matrix visualization with two dimension fields, Category and Metric. For each Category, there can be different Metrics (or subcategory). I am attempting to calculate custom subtotal values to display on rows in matrix, but having issues in returning a value at the Category level. For this special Category row value, "Monthly_Actual to Number Measure", won't return for some reason. I will say that it is a measure from a different table ('bsc_outcome') whereas the other measure is coming from the 'Union_Table'. I replaced this value with a different value from 'Uniton_Table' to test and it worked, so it has something to do with table relationship or filters? Not sure. See image and dax calculation below:

PBIHelp.png



Matrix Value for Category Test v2 =

SWITCH (
    TRUE(),
    ISINSCOPE ( UnionTable[Metric] ),
        [Current Month],
    ISINSCOPE ( UnionTable[Category] ),
            [Monthly_Actual to Number Measure],
    BLANK()
)


Thank you!!!

1 ACCEPTED SOLUTION
flushedpeach
Regular Visitor

@Amar_Kumar Thank you! I experimented a little bit and while that formula didn't quite work, this one seemed to do the trick:

SWITCH(
    TRUE(),
    ISINSCOPE(UnionTable[Metric]),
        [Current Month],
    ISINSCOPE(UnionTable[Category]) && NOT ISINSCOPE(UnionTable[Metric]),
        CALCULATE(
            [Monthly_Actual to Number Measure],
            REMOVEFILTERS(UnionTable[Metric])
        ),
    BLANK()
)

I hope the REMOVEFILTERS won't cause any issues.

View solution in original post

2 REPLIES 2
flushedpeach
Regular Visitor

@Amar_Kumar Thank you! I experimented a little bit and while that formula didn't quite work, this one seemed to do the trick:

SWITCH(
    TRUE(),
    ISINSCOPE(UnionTable[Metric]),
        [Current Month],
    ISINSCOPE(UnionTable[Category]) && NOT ISINSCOPE(UnionTable[Metric]),
        CALCULATE(
            [Monthly_Actual to Number Measure],
            REMOVEFILTERS(UnionTable[Metric])
        ),
    BLANK()
)

I hope the REMOVEFILTERS won't cause any issues.
Amar_Kumar
Super User
Super User

This is a filter / relationship issue, not an ISINSCOPE issue.

Your matrix uses Category and Metric from UnionTable.
At the Category subtotal level, the filter on UnionTable[Category] does not propagate to bsc_outcome, so [Monthly_Actual to Number Measure] evaluates to blank. That’s why measures from UnionTable work but the one from bsc_outcome does not.

Quick fix is to force the Category filter onto bsc_outcome:

Matrix Value for Category Test v2 =
SWITCH(
    TRUE(),
    ISINSCOPE(UnionTable[Metric]),
        [Current Month],
    ISINSCOPE(UnionTable[Category]),
        CALCULATE(
            [Monthly_Actual to Number Measure],
            TREATAS(
                VALUES(UnionTable[Category]),
                bsc_outcome[Category]
            )
        ),
    BLANK()
)

Root cause is either:

  • No active relationship between UnionTable and bsc_outcome

  • Category does not filter bsc_outcome

  • Relationship direction is wrong

Fixing the model relationship can also solve it without TREATAS.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors