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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JB505
Frequent Visitor

Help with Matrix measure

Hello. I'm trying to accomplish something that seems very basic, but either can't figure it out or it's just not possible.

 

I have a measure that I want to show one thing when the matrix is collapsed, but show another thing on that same row when the matrix is expanded.

 

So when collapsed, I want Color to say "Expand Category"

JB505_0-1691006435955.png

 

When expanded, I want to show the color for the types of fruit, but I want the category (highlighted below) to be blank.

JB505_2-1691006628978.png

Here is my measure.

_color =
SWITCH(
    TRUE(),
    ISINSCOPE('Table'[Type]), MAX('Table'[Color]),
    ISINSCOPE('Table'[Category]), "Expand Category",
    BLANK()
)
 
Is this possible?
2 REPLIES 2
vicky_
Super User
Super User

There's a way to do this without DAX - go to format > Row Subtotals > select Category (i think?) and then uncheck the Show Subtotals. Have a play around to find a configuration that works for you. Hope this helps. 

 

vicky__0-1691014340653.png

 

JB505
Frequent Visitor

Hi @vicky_ ,

 

Appreciate the help. I don't think this can be solved with row subtotals. The reason is because I do want something to show up, just not all the time, if that makes sense. So here is what I want the visual to look like depending on when it's collapsed or expanded.

 

Collapsed

JB505_0-1691418812456.png

Expanded

JB505_1-1691419238597.png

 

See how the color column shows one thing in the fruit row depending on whether collapsed or expanded. It also shows the colors of the fruit. So it's three different things that the measure could show (Expand Category, Blank, Color of Fruit) and it all depends on the category being collapsed or expanded...

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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