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
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
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.