Forum Discussion

salucas's avatar
salucas
Frequent Visitor
3 years ago
Solved

Hide last level values from matrix table

Hi everyone,
I have a matrix table that l need to hide the value of last level.

Note: Im using measures.
Someone can help me with this?
This is how my data looks like:

ContinentCountryStateTotal
North AmericaUSANewYork25
North AmericaUSATexas25
North AmericaUSAFlorida25
North AmericaUSAVirginia25
North AmericaCanadaBritish Columbia15
AsiaIndiaAndhra Pradesh20
AsiaIndiaTamil Nadu20
AsiaIndiaKarnataka20
South AmericaBrasilSão Paulo30


My expecteds outputs: I want to show the output in Matrix table 3 levels (Continent, Country and State) sales. But I only want to see total in Continent and Country Level but if expand to State it should be blank as mentioned below.
-At Continent Level:

ContinentTotal
North America115
Asia60
South America30


-After expand to country level:

ContinentTotal
North America115
USA100
Canada15
Asia60
India60
South America30
Brasil30


-After expand to state level:

ContinentTotal
North America115
USA100
NewYork 
Texas 
Florida 
Virginia 
Canada15
British Columbia 
Asia60
India60
Andhra Pradesh 
Tamil Nadu 
Karnataka 
South America30
Brasil30
São Paulo 

Thanks,

Lucas.

  • Hey salucas,

    You can easily process this in a measure using the ISINSCOPE function. As long as the 'State' column is not in scope you will show the 'Total', otherwise not:

    Measure =
    IF ( NOT ISINSCOPE ( 'Table'[State] ), SUM ( 'Table'[Total] ) )

    For 'State' make sure you show items with no data.

    Result:

3 Replies

  • Barthel's avatar
    Barthel
    Icon for Solution Sage rankSolution Sage

    Hey salucas,

    You can easily process this in a measure using the ISINSCOPE function. As long as the 'State' column is not in scope you will show the 'Total', otherwise not:

    Measure =
    IF ( NOT ISINSCOPE ( 'Table'[State] ), SUM ( 'Table'[Total] ) )

    For 'State' make sure you show items with no data.

    Result:

  • AbbasG's avatar
    AbbasG
    Icon for Memorable Member rankMemorable Member

    salucas below will help you achieve the desired output. Put Continent, country, and state in rows field and Total in values as below