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.
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
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!