cancel
Showing results for 
Search instead for 
Did you mean: 
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors