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
JeanMartinL
Advocate II
Advocate II

Hiding specific columns of a column group inside a Matrix

Here is a very contrived example to show what I'm trying to do.

 

Let's start with this very simple dataset:

JeanMartinL_0-1650301338487.png

I then have a bunch of measures like:

MinA = CALCULATE(MIN('Table'[Value]),'Table'[Type] = "A")
And the equivalent for MaxA, MinB, MaxB.
I also have 2 mesures that redirect to the appropriate sub mesure depending on the selected type
Min =
VAR S = SELECTEDVALUE('Table'[Type])
RETURN SWITCH(TRUE,
S = "A", [MinA],
S = "B", [MinB],
-1
)
(Of course I realize that in this exemple this is not necessary, but it might be needed in a more complexe model with more complicated filters than simply [Type])
 
This gives me the result I want:
JeanMartinL_2-1650301741620.png

JeanMartinL_1-1650301727637.png

 

So far so good. But now let's say I want an unbalanced second level and don't always want to see Min/Max for all types.

For example, I don't want to see Min for "B". 

JeanMartinL_8-1650302545669.png

 

I thought I could simply return BLANK() for types I don't want:

Min =
VAR S = SELECTEDVALUE('Table'[Type])
RETURN SWITCH(TRUE,
S = "A", [MinA],
S = "B", BLANK(),
-1
)

 But when doing this, the column still shows with a blank. (And no, I don't have "Show Items with no data" activated).

JeanMartinL_3-1650301968723.png

 

Adding a Filter on "Min is not blank" removes the whole B type instead of just the empty column.

JeanMartinL_4-1650302036494.png

 

JeanMartinL_5-1650302046088.png

 

I feel like I'm close to a solution but I can't quite get there.

 

The other approach I tried is to remove Word Wrap and try to manually hide the column but resizing it ... but that also seem to be inperfect since it always leaves some space and with conditionnal formating in place it makes some pretty ugly and unuititive results (See the out of place red box of the resized column in this screenshot).

JeanMartinL_6-1650302299090.png

 

As a side note, we are using Report Server. I don't believe the Matrix in the cloud edition reacts differently but I could be wrong.

 

Thanks!

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @JeanMartinL ,

 

If you want to hide Min Column only under B but display it under the others, you can't do this like you would in Excel.

 

One solution I can think of is to mask this area with a graphic of the same color.

vcgaomsft_0-1650510761424.png

vcgaomsft_1-1650510909469.png

The PBIX file is attached for reference.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @JeanMartinL ,

 

If you want to hide Min Column only under B but display it under the others, you can't do this like you would in Excel.

 

One solution I can think of is to mask this area with a graphic of the same color.

vcgaomsft_0-1650510761424.png

vcgaomsft_1-1650510909469.png

The PBIX file is attached for reference.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

This is certainly not the most graceful solution but it is a solution, one that I hadn't considered.

Thanks for the help!

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.