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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gavin007
Helper V
Helper V

Parameters slicer

I have 6 sales related tables which have the same column called company, it is 3 digit code like 100 is subsidary 1, 200 is subsidery 2. 

 

I want to create a parameter slicer in page to acheive the following objective.

-When user select one company code, all the tables will get filtered in the company column by that company.

-if user select all in slicer, there are not filter to apply or filter will be selected all in the company column for all 6 tables.

 

I am not sure how to do this parameter in DAX or M. Can anyone help?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@gavin007 , do you common company code table joining to all these tables.

 

If not have one like

Company Code = distinct(union(all(Table1[code]),all(TableB[code]),all(TableC[code]),all(TableD[code]),all(Tablee[code])))

 

and join it all 6 tables and use code from this table slicer

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@gavin007 , do you common company code table joining to all these tables.

 

If not have one like

Company Code = distinct(union(all(Table1[code]),all(TableB[code]),all(TableC[code]),all(TableD[code]),all(Tablee[code])))

 

and join it all 6 tables and use code from this table slicer

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

not enough information to be useful. Please give a general reply that can be adapted. how would this work if the parameter is a date, not a code?

Basically, I want to make the dynamic parameter in power query to control the company to be available in power bi report.  The folllowing link gives me a glispe of hope. I will test it to see if it works.

 

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

@amitchandak the 6 tables are mix of master tables like customer, item and transactional table like actual sales and budget sales.

 

they are linked together but not through company code. e.g. customer master table link to sales tables through customer code. There is no such table called company code to link them together. 

 

I guess my question is how to filter those 6 tables when user select the company code in the slicer. At the moment, i can do it only in parameter in power query. 

 

 

@amitchandak i have fixed the problem by using normal slicer base on company column. Your idea is not the same as what i have implemented, but I take the idea of building a related table set.

 

I was confused with the parameter and slicer in a connected tables. My original idea is to have paremeter filter in power query so that when user select it, it will filter the data. The only problem with is is end user are not supposed to change what view they are allowed to see based on dynamic dataset, they should be restrained by RLS based on the same data set.

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.