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
Selwynster
Helper II
Helper II

Multi Select Slicer

 

I have a image below with a table (left) with 2 columns, and a slicer on the right.

Am i able to (using the slicer), find the date (Attribute) where ALL conditions are met?

In SQL terms, i need an 'AND' result, not 'OR' (which is what the slicer currently gives me).

So i need one date Attribute result, that has a 2, 6 and 9 Value.

Hope i am explaining myself correctly. 

 

Capture.PNG

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Selwynster,

 

Please try a measure like below.

Measure =
VAR actualAmount =
    CALCULATE ( DISTINCTCOUNT ( Table1[Value] ), ALLSELECTED ( Table1[Value] ) )
VAR selectedValues =
    CALCULATE (
        DISTINCTCOUNT ( Table1[Value] ),
        ALLSELECTED ( Table1[Value] ),
        ALL ( Table1[Attribute] )
    )
RETURN
    IF ( actualAmount = selectedValues, 1, 0 )

Multi_Select_Slicer

 

Best Regards,

Dale

Community Support Team _ Dale
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

11 REPLIES 11
v-jiascu-msft
Employee
Employee

Hi @Selwynster,

 

Please try a measure like below.

Measure =
VAR actualAmount =
    CALCULATE ( DISTINCTCOUNT ( Table1[Value] ), ALLSELECTED ( Table1[Value] ) )
VAR selectedValues =
    CALCULATE (
        DISTINCTCOUNT ( Table1[Value] ),
        ALLSELECTED ( Table1[Value] ),
        ALL ( Table1[Attribute] )
    )
RETURN
    IF ( actualAmount = selectedValues, 1, 0 )

Multi_Select_Slicer

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-jiascu-msft,

I have a silmilar issue, I tried the DAX you provided in this post but did not work for me. I have a map connected to the data and when I make a multiple selection, I want the selections made to display using AND feature and pop up in the map. Also I want the list of those to be displayed in a table. And the map color to be changed based on the filter selection combination (different color for different combination). I appreciate your support on this. Thank you.

Hi @Anonymous,

 

I would suggest you create a new post in this forum. It looks like a different scenario.

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks. Will do.

Wow, this works amazingly.

Thanks Smiley Happy

quentin_vigne
Solution Sage
Solution Sage

Hi @Selwynster

 

Did you try using 3 slicers instead of one ? 

 

Because when you select multiples values from a slicer it will display everything that has one the three at least 

 

Else can you post here a sample of your data so that we try to solve the problem ?

 

- Quentin

Hi  @quentin_vigne

Using 3 slicers does not work because when i select 1 option in the first slicer, it limits the other slicers immediately.

The data i have is basically what is seen in the first table (on the left of the image.)

Sorry, i am new here, so i not sure how to send the entire dataset.

The end result i need would look like:

1/2/2016      2

1/2/2016      6

1/2/2016      9

(if that date has all the Values)

I am not interested in dates that only have one of the 3 Values.

@Selwynster

 

 

In the sample of data you provided me there is only distinct attribute so I can't try my soluce on this data 

 

- Quentin

@quentin_vigne, Here below some better data:

AttributeValue
9/9/20162
9/9/201618
9/9/201635
9/9/201637
9/9/20142
9/9/20144
9/9/201418
9/9/201419
9/9/201429
9/9/201110
9/9/201118
9/9/201123
9/9/201136
9/9/201140
9/8/201734
9/8/20176
9/8/20177
9/8/201742
9/8/20151
9/8/201512
9/8/201513
9/8/201514
9/7/20129
9/7/201214
9/7/201217
9/7/201234
9/7/201241
9/7/20103
9/7/201025
9/7/201037
9/7/201042
9/7/201044
9/6/20164
9/6/201618
9/6/201639
9/6/201643
9/6/201315
9/6/201316
9/6/201324
9/6/201329
9/6/201340
9/6/20111
9/6/20112
9/6/20115
9/6/201130
9/6/201140
9/5/201714
9/5/20172
9/5/201732
9/5/201713
9/5/20141
9/5/20148
9/5/201424
9/5/201433
9/5/201443
9/4/20151
9/4/201525
9/4/201529
9/4/201543
9/4/20126
9/4/201215
9/4/201219
9/4/201230
9/4/201245
9/30/20165
9/30/201615
9/30/201616
9/30/201625
9/30/201418
9/30/201427
9/30/201437
9/30/201439
9/30/201441
9/30/201111
9/30/201121
9/30/201124
9/30/201128
9/30/201135
9/3/201317
9/3/201328
9/3/201332
9/3/201333
9/3/201336
9/3/201012
9/3/201017
9/3/201037
9/3/201041
9/3/201043
9/29/201742
9/29/201739
9/29/201726
9/29/201732
9/29/201510
9/29/201511
9/29/201512
9/29/201524
9/28/20121
9/28/20126
9/28/20127
9/28/201240
9/28/201241
9/28/20101
9/28/20103
9/28/20104
9/28/20105
9/28/201040
9/27/20163
9/27/201611
9/27/201634
9/27/201637
9/27/20136
9/27/201313
9/27/201321
9/27/201328
9/27/201331
9/27/20111
9/27/20117
9/27/20118
9/27/201122
9/27/201140
9/26/201745
9/26/201717
9/26/201733
9/26/20179
9/26/20141
9/26/20143
9/26/20146
9/26/201434
9/26/201437
9/25/201514
9/25/201520
9/25/201521
9/25/201526
9/25/20122
9/25/201228
9/25/201232
9/25/201234
9/25/201245
9/24/20136
9/24/201323
9/24/201325
9/24/201326
9/24/201343
9/24/20101
9/24/20105
9/24/201010
9/24/201016
9/24/201019
9/23/20163
9/23/201611
9/23/201630
9/23/201632
9/23/20147
9/23/201410
9/23/201421
9/23/201422
9/23/201434
9/23/20115
9/23/201122
9/23/201124
9/23/201125
9/23/201127
9/22/20174
9/22/201712
9/22/201728
9/22/201730
9/22/20152
9/22/201521
9/22/201522
9/22/201525
9/21/201213
9/21/201216
9/21/201224
9/21/201239
9/21/201243
9/21/201031
9/21/201033
9/21/201036
9/21/201040
9/21/201042
9/20/20162
9/20/201618
9/20/201629
9/20/201632
9/20/201315
9/20/201322
9/20/201329
9/20/201330
9/20/201338
9/20/20118
9/20/201110
9/20/201123
9/20/201131
9/20/201138
9/2/201620
9/2/201623
9/2/201630
9/2/201638
9/2/201411
9/2/201421
9/2/201436
9/2/201439
9/2/201444
9/2/201115
9/2/201125
9/2/201134
9/2/201143
9/2/201145
9/19/201739
9/19/201722
9/19/201715
9/19/201725
9/19/20149
9/19/201413
9/19/201425
9/19/201428
9/19/201434
9/18/20155
9/18/201517
9/18/201525
9/18/201540
9/18/20121
9/18/201227
9/18/201237
9/18/201240
9/18/201242
9/17/201311
9/17/201318
9/17/201322
9/17/201327
9/17/201329
9/17/20102
9/17/201019
9/17/201028
9/17/201042
9/17/201044
9/16/20161
9/16/201612
9/16/201633
9/16/201634
9/16/20147
9/16/201412
9/16/201428
9/16/201443
  

 

Hi @Selwynster

 

Is there a maximum of selected number ? If it's 3 or less I have a solution, else I need to keep thinking about it

 

- Quentin

@Selwynster

 

Perhaps if you don't enable interactions between the 3 slicers it will work 

 

 

On this guide you will find how to send sample of data

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Copy and paste your table from the data table here so that I can copy them right into my pbi desktop

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.