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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
HEW
Helper III
Helper III

Format for hidden columns change when using slicer

Hi.

 

I have a matrix, where I have the monthly figures and a running total. For the different categories I would like to show the monthly figures and for the total I would like to show the running total. I am able to "hide" the columns by setting auto-size to off and then dragging the columns. However, when I change the employee I would like to see (slicer) the format changes and the hidden columns are partly visible.

Vacation 2.PNG

How can I solve this? It doesn't look very nice. The first matrix is correct and the second shows my problem.

 

Thanks a lot.

Helen

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

Hi @HEW ,

 

I created a simply data sample to test:

Eyelyn9_0-1639362838933.png

To my knowledge, since there is no option to dynamically hide fields based on a slicer, you may use Conditional Formatting to keep the font color to make it look like hidden:

change sum color = IF(MAX('ForSlicer'[Value])="sum","Black","White")
change average color = IF(MAX('ForSlicer'[Value])="average","Black","White")

Eyelyn9_4-1639364348847.png

 

 

 

Or create a new table for slicer firstly, and then use SWITCH() to match the measures like:

ForSlicer = {"sum","average"} 
Measure = SWITCH(MAX('ForSlicer'[Value]),"sum",[sum],"average",[average])

Eyelyn9_1-1639362896688.png

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-eqin-msft
Community Support
Community Support

Hi @HEW ,

 

I created a simply data sample to test:

Eyelyn9_0-1639362838933.png

To my knowledge, since there is no option to dynamically hide fields based on a slicer, you may use Conditional Formatting to keep the font color to make it look like hidden:

change sum color = IF(MAX('ForSlicer'[Value])="sum","Black","White")
change average color = IF(MAX('ForSlicer'[Value])="average","Black","White")

Eyelyn9_4-1639364348847.png

 

 

 

Or create a new table for slicer firstly, and then use SWITCH() to match the measures like:

ForSlicer = {"sum","average"} 
Measure = SWITCH(MAX('ForSlicer'[Value]),"sum",[sum],"average",[average])

Eyelyn9_1-1639362896688.png

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors