cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sk15227
Post Patron
Post Patron

Filter Columns in Table Based on Filter

Hi,

 

Is there a way to filter columns in a table? for example, in the table below, if no Month is selected, I want to show the fields ENTRIES test, % Entries Full Year, and Count Weekday Full Year.

 

If I click on a certain month, I only want the ENTRIES test, % Entries, and Count Weekday fields to be shown.


Is this possible?

Capture.PNG

 

Thank you!
Sarah

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

hi  @sk15227 

For your case, you could try this way to get it:

Step1:

Add a new table that contains these five measures name

6.JPG

Step2:

Then create a measure as below

Measure =
SWITCH(SELECTEDVALUE('Columns'[Type]),
"ENTRIES test",[ENTRIES test],
"% Entries Full Year",IF(ISFILTERED('Table'[Month]),BLANK(),[% Entries Full Year]),
"Count Weekday Full Year",IF(ISFILTERED('Table'[Month]),BLANK(),[Count Weekday Full Year]),
"% Entries",IF(ISFILTERED('Table'[Month]),[% Entries],BLANK()),
"Count Weekday",IF(ISFILTERED('Table'[Month]),[Count Weekday],BLANK()))

Step3:

Now drag Type field into columns of matrix visual and this measure instead of these five measure into visual.

 

here is simple sample pbix file.

Result:

7.JPG8.JPG

 

Regards,

Lin

Community Support Team _ Lin
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
v-lili6-msft
Community Support
Community Support

hi  @sk15227 

For your case, you could try this way to get it:

Step1:

Add a new table that contains these five measures name

6.JPG

Step2:

Then create a measure as below

Measure =
SWITCH(SELECTEDVALUE('Columns'[Type]),
"ENTRIES test",[ENTRIES test],
"% Entries Full Year",IF(ISFILTERED('Table'[Month]),BLANK(),[% Entries Full Year]),
"Count Weekday Full Year",IF(ISFILTERED('Table'[Month]),BLANK(),[Count Weekday Full Year]),
"% Entries",IF(ISFILTERED('Table'[Month]),[% Entries],BLANK()),
"Count Weekday",IF(ISFILTERED('Table'[Month]),[Count Weekday],BLANK()))

Step3:

Now drag Type field into columns of matrix visual and this measure instead of these five measure into visual.

 

here is simple sample pbix file.

Result:

7.JPG8.JPG

 

Regards,

Lin

Community Support Team _ Lin
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

az38
Super User
Super User

Hi @sk15227 

no, sorry

only play with bookmarks


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors