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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
PBIfanatic
Helper V
Helper V

ALLSELECTED on a slicer

Hi,

 

Is there a way to use AllSelected on a slicer ?

I have few slicers on the report and wanted to use the different slicer selections for different tables.

 

Slicer 1 will filter table 1

Slicer 2 will filter table 2 and so on. 

 

Using edit intractions I have achieved the filter context but I need to add a column to the table but this needs to look at only slicer 2. 

 

Is this possible?

 

thanks.

1 ACCEPTED SOLUTION

Hi, @PBIfanatic 

 

Here is a demo.

Pbix attached

 

If  help ,please try steps as below.

1.duplicate  table  and click "close&apply"

68.png

 

2.Create calculate table as the slicer of table 2

Table = DISTINCT('financials'[Country])

 

3. create measure as below to replace the column your mentioned.

MEASURE COGS2 = CALCULATE(SUM(financials[COGS]),FILTER(CALCULATETABLE(ALLSELECTED('financials'),ALL(financials[Country])),'financials'[Country] in DISTINCT('Table'[Country])))

 

4.Using edit intractions to achieved the filter context

it will show as below 

69.png

 

 

Best Regards,
Community Support Team _ Eason
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

8 REPLIES 8
kentyler
Solution Sage
Solution Sage

Do table 1 and table 2 have relationship(s)

If so, when the table 1 slicer slices table 1 it might also affect the records displayed from table 2, and vice versa.

If there are no relationships between the 2 tables, then you can create your slicers directly from columns in the tables, and each slicer will slice only the table it is drawn from.

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Hi @kentyler ,

 

Thanks for your reply. 

I meant table visualization, there is just 1 table in the data model. 

 

I wanted to do comparitive analysis, so I need to replicate the slicers and tables and then make different selections on the slicers.

 

thanks.

If you go to Power Query you can make a "reference" copy of the table, which should not be affected by slicers you put on the first table, and you should be able to "slice" the reference table independently





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Hi @kentyler ,

thanks, thats definitely an option. 

 

But is there no way we can capture the selections from the slicers (using the same column) in the example I mentioned. 

 

 

Hi, @PBIfanatic 

 

Here is a demo.

Pbix attached

 

If  help ,please try steps as below.

1.duplicate  table  and click "close&apply"

68.png

 

2.Create calculate table as the slicer of table 2

Table = DISTINCT('financials'[Country])

 

3. create measure as below to replace the column your mentioned.

MEASURE COGS2 = CALCULATE(SUM(financials[COGS]),FILTER(CALCULATETABLE(ALLSELECTED('financials'),ALL(financials[Country])),'financials'[Country] in DISTINCT('Table'[Country])))

 

4.Using edit intractions to achieved the filter context

it will show as below 

69.png

 

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-easonf-msft ,

 

Thanks for your reply and the attachment. 

I can use this in my current model.

 

But is there any way we can refer to the slicers without duplicating the tables or creating references?

 

Is there a way we can use the slicer names in DAX?

 

thanks.

Hi , @PBIfanatic 

Sorry, this is the only solution I think of at the moment.

Hope others can come up with better solutions

 

Best Regards,
Community Support Team _ Eason

I'm not clear.

When you pick a value in slicer 1, and then in slicer 2

do you want the table to be filtered by both values

or do you want to have to tables (displayed) each of which is filtered by a different slicer





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors