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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to filter columns based on measure

Hi!

I have challenge in a report I am working with. Here you see a matrix visual with date on Rows and FG (= Fish Group) on Columns and number of fish on Values. If I have a date filter adding more days to it, you see what happen including 5. Jan. But when we come to 6.Jan, fishes are moved to other fish groups (FG 2 and FG4). Now fish group FG1 and FG3 is empty. My question is I want columns which has no fish not to be shown in the report. It works as is until the 5. Jan. How can I implement this using DAX measure

 

Untitled.png

 

This is the final view of the report on 6 Jan. (Why there is fish in Fish Group FG2 and FG4 before 6. jan is because it has fish group the fish group FG1 and FG3 that now is empty). But that is not important now. I just want to hide columns that has no fish on the latest date in the date filter.

Untitled2.png

You can of course you other examples but I think I have described what feature I am looking for

 

Regards Geir

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

Hi @Anonymous ,

 

I think you want some dynamic columns in the visual. You can refer to this case. Download the sample file of this case and modify it to get the result you want.
https://community.powerbi.com/t5/Desktop/Dynamic-column-selection-for-matrix-visual/m-p/687993

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

I think you want some dynamic columns in the visual. You can refer to this case. Download the sample file of this case and modify it to get the result you want.
https://community.powerbi.com/t5/Desktop/Dynamic-column-selection-for-matrix-visual/m-p/687993

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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