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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Lakshmiramesh
Regular Visitor

Matrix Visualization :How to hide columns and same time text wrap

Hej,

 

I need to hide columns , with the condition like before 2024 means hide few columns, after or current year means shows few column in matrix Visualization .

 

When I just adjust the slider, it is ok, but text wrap gives problem again.

 

In below :test,testetestetstetstest columns should show only on Currentyear.(2024) and column 'testetestetstetstest' 

 

Lakshmiramesh_0-1717608219751.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Lakshmiramesh ,

Based on my testing, please try the following methods again:

1.Create the simple table.

vjiewumsft_0-1717639368472.png

2.Create the new measures to filter the hide columns.

Hide column = 
var _dat = SELECTEDVALUE('Table test'[Date])
var pro_ = SELECTEDVALUE('Table test'[Program])
var result = CALCULATE(SUM('Table test'[Cost]), ALLEXCEPT('Table test', 'Table test'[Date], 'Table test'[Program]))
RETURN
IF(_dat = "Current year 2024" && pro_ in {"Budget", "Forbrug", "test1"}, BLANK(), result)

3.Drag the measure into the matrix visual values.

vjiewumsft_1-1717639388380.png

4.The result is shown below.

vjiewumsft_2-1717639419544.png

Best Regards,

Wisdom Wu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Lakshmiramesh ,

Based on my testing, please try the following methods again:

1.Create the simple table.

vjiewumsft_0-1717639368472.png

2.Create the new measures to filter the hide columns.

Hide column = 
var _dat = SELECTEDVALUE('Table test'[Date])
var pro_ = SELECTEDVALUE('Table test'[Program])
var result = CALCULATE(SUM('Table test'[Cost]), ALLEXCEPT('Table test', 'Table test'[Date], 'Table test'[Program]))
RETURN
IF(_dat = "Current year 2024" && pro_ in {"Budget", "Forbrug", "test1"}, BLANK(), result)

3.Drag the measure into the matrix visual values.

vjiewumsft_1-1717639388380.png

4.The result is shown below.

vjiewumsft_2-1717639419544.png

Best Regards,

Wisdom Wu

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

Thanks for the Help.

 

But I am not using any slicer to select the value ,Just display the data in Matrix. 

First two values itseif as a column in a table need to show before 2024. Dragged the

From third values, need to show only in 'Current year' in Date column.

 

Also the names are long, need to do textwrap.

Lakshmiramesh_0-1717663940725.png

 

For quick solution withouit using Dax, i just adjust it manually to hide,which works well. But when I do the Textwrap. it becames bad looks.

 

Lakshmiramesh_1-1717664195733.png

 

 

Lakshmiramesh_2-1717664273108.png

Thanks in advance.

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.