cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tmv3v
Frequent Visitor

Multi-level Filter for tables

I have trouble create a table with varying number of columns.

 

Say I have the following dataset containing some sales data

 

Customer ID | Country | Customer group | Number of products bought

 

How do I create a table where I can use slicer such that with I select all customer ID and customer group, the two columns will disappear in the table and leaving only country | number of products?

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

Hi @tmv3v ,

If you wanna use a table visual, based on my research, it is not supported yet for now. But you can post an idea here.

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

But in the meanwhile ,I can show you a workaround where you can make 2 columns disappear when you select all the the columns in a slicer.

 Steps are as below:

  1. Create a measure as below:
Measure = IF(ISFILTERED('Table'[Customer group])&&CALCULATE(COUNT('Table'[Customer group]),ALL('Table'))=CALCULATE(COUNT('Table'[Customer group]),ALLSELECTED('Table'))&&MAX('Table (2)'[Column1])="Customer group",BLANK(),IF(ISFILTERED('Table'[Customer ID])&&CALCULATE(COUNT('Table'[Customer ID]),ALL('Table'))=CALCULATE(COUNT('Table'[Customer ID]),ALLSELECTED('Table'))&&MAX('Table (2)'[Column1])="Customer ID",BLANK(),SUM('Table'[Number of products bought])))

 

 

2.Choose a matrix, and pick the fields  as below:

111.png

 

 

3, Finally when you select all the columns ,they would “disappear ” in the Matrix.

555.png666.png

 

For the related .pbix file,you can turn to URL:

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/ESr1qNoJaWpHgcH3CCOrP...

 

Hope this would help.

Best Regards,

Kelly

 

 

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @tmv3v ,

If you wanna use a table visual, based on my research, it is not supported yet for now. But you can post an idea here.

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

But in the meanwhile ,I can show you a workaround where you can make 2 columns disappear when you select all the the columns in a slicer.

 Steps are as below:

  1. Create a measure as below:
Measure = IF(ISFILTERED('Table'[Customer group])&&CALCULATE(COUNT('Table'[Customer group]),ALL('Table'))=CALCULATE(COUNT('Table'[Customer group]),ALLSELECTED('Table'))&&MAX('Table (2)'[Column1])="Customer group",BLANK(),IF(ISFILTERED('Table'[Customer ID])&&CALCULATE(COUNT('Table'[Customer ID]),ALL('Table'))=CALCULATE(COUNT('Table'[Customer ID]),ALLSELECTED('Table'))&&MAX('Table (2)'[Column1])="Customer ID",BLANK(),SUM('Table'[Number of products bought])))

 

 

2.Choose a matrix, and pick the fields  as below:

111.png

 

 

3, Finally when you select all the columns ,they would “disappear ” in the Matrix.

555.png666.png

 

For the related .pbix file,you can turn to URL:

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/ESr1qNoJaWpHgcH3CCOrP...

 

Hope this would help.

Best Regards,

Kelly

 

 

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors