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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Merge selection from two slicers

Hello to all, 

I am puzzled by one task and will be very glad if you could give a hint. 

 

For simplification of the situation, let's have two tables - weekly sales and weekly brand awareness.

BrandWeekSales
Alpha 1Week 1204
Alpha 2Week 139
Alpha 3Week 128
Beta 1Week 1291
Beta 2Week 1208
Beta 3Week 1295

 

BrandWeekProductAwareness
Alpha 1Week 1Coffee42%
Alpha 2Week 1Coffee43%
Alpha 3Week 1Coffee41%
Beta 1Week 1Coffee66%
Beta 2Week 1Coffee63%
Beta 3Week 1Coffee9%
Alpha 1Week 1Tea52%
Alpha 2Week 1Tea16%
Alpha 3Week 1Tea69%
Beta 1Week 1Tea24%
Beta 2Week 1Tea9%
Beta 3Week 1Tea27%

 

Alpha1, Alpha 2, Alpha 3 are brands of mother company.

Beta 1, Beta 2, Beta 3 are competing brands. 

Each of these groups of brands are included to separate slicers (Alpha - in Alpha slicer, Beta - in Beta slicer) with single selection for each. 

 

Having brands in different slicers allows building the first two charts but doesn't allow to make the last two charts (see picture below).  

 

Capture-.JPG

 

I am trying to find a way to somehow merge the selections made in Alpha & Beta slicers in order not to make one more slicer for the third and the fourth charts. 

 

Is there any way to do so? I was trying to implement SELECTEDVALUE, tried to make calculated columns in raw data - it doesn't work, alas. 

 

Many thanks for your answer in advance. 

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

hi @Anonymous 

(Alpha - in Alpha slicer, Beta - in Beta slicer)

since Alpha and Beta and in the same column, why do you want to keep them in two separate slicers?

Do you have set edit interaction for them to get it?

If so, I would suggest you put them in one slicer not in two slicers, in your current way, it could not get the last two charts.

 

 

If you still want to keep them in two separate slicers, you need two separate dim brand table, which is for Alpha and another for Beta.

then create measure as below:

Alpha sales = CALCULATE(SUM('weekly sales'[Sales]),FILTER('weekly sales','weekly sales'[Brand] in VALUES(Alpha[Brand])))
Bate sales = CALCULATE(SUM('weekly sales'[Sales]),FILTER('weekly sales','weekly sales'[Brand] in VALUES(Beta[Brand])))
sum sales = CALCULATE(SUM('weekly sales'[Sales]),FILTER('weekly sales', 'weekly sales'[Brand] in VALUES(Alpha[Brand])||'weekly sales'[Brand] in VALUES(Beta[Brand])))

 

Of course, it has the same logic for weekly brand awareness table.

 

here is sample pbix file, please try it.

 

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

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

(Alpha - in Alpha slicer, Beta - in Beta slicer)

since Alpha and Beta and in the same column, why do you want to keep them in two separate slicers?

Do you have set edit interaction for them to get it?

If so, I would suggest you put them in one slicer not in two slicers, in your current way, it could not get the last two charts.

 

 

If you still want to keep them in two separate slicers, you need two separate dim brand table, which is for Alpha and another for Beta.

then create measure as below:

Alpha sales = CALCULATE(SUM('weekly sales'[Sales]),FILTER('weekly sales','weekly sales'[Brand] in VALUES(Alpha[Brand])))
Bate sales = CALCULATE(SUM('weekly sales'[Sales]),FILTER('weekly sales','weekly sales'[Brand] in VALUES(Beta[Brand])))
sum sales = CALCULATE(SUM('weekly sales'[Sales]),FILTER('weekly sales', 'weekly sales'[Brand] in VALUES(Alpha[Brand])||'weekly sales'[Brand] in VALUES(Beta[Brand])))

 

Of course, it has the same logic for weekly brand awareness table.

 

here is sample pbix file, please try it.

 

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.
amitchandak
Super User
Super User

@Anonymous , which slicer you want to avoid. Not very clear. It seems you already have a common Brand and week dimension. and that is joined to both tables.

Table / Dimension - Brand, Week

Tables /Fact - Table 1, Table 2

Anonymous
Not applicable

Dear @amitchandak Thanks for your reply. 

 

I have a report where I have a control panel at the top, then two sales charts, and finally, awareness charts.  On my control board I have two separate slicers (one - for Alpha brands, second - for Beta brands). I select one brand from each group (for example, Alpha 2 in Alpha slicer, Beta 1 in Beta slicer) and easily make separate sales charts, as shown in my example picture). 

 

Yet, I can't make awareness charts, because each slicer filters each group and they don't intersect. Of course, I can make additional slicer with multiple selection after sales charts and manually select there Alpha 2 & Beta 1, but I want to avoid it. 

 

So I was thinking of some solution which can: 1) understand, what is selected in each of Alpha and Beta slicers 2) combine selection of Alpha & Beta slicers 3) use this selection as a pre-filter for awareness charts. 

 

Hope I made the issue clearer. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.