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

capture slicer selection

Need a dax to capture second higher slicer selection. In my case it is 100:

 

Capture4.PNG

I know I can get selected value when single selection with:

SELECTEDVALUE('price table'[price max])

 

But how to get this with multiple ones?

I am gonna use it later to create sales measure to work on ranges selected on slicer

1 ACCEPTED SOLUTION

@Anonymous,

 

Change it as follows.

Measure =
MAXX (
    FILTER (
        ALLSELECTED ( 'price table'[price max] ),
        'price table'[price max] < MAX ( 'price table'[price max] )
    ),
    'price table'[price max]
)
    + 0
Community Support Team _ Sam Zha
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

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may use measure below.

Measure =
MINX (
    TOPN ( 2, VALUES ( 'price table'[price max] ), 'price table'[price max], DESC ),
    'price table'[price max]
)
Community Support Team _ Sam Zha
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 Sam,

 

I think I was not precise in my question. Your measure is working but not in all cases, which I had not mentioned before.

It works on total only.

Sorry for this. I hope you can help further.

How to do a measure to work in a matrix like this?:

 

Capture5.PNG

An output should show the figures like those on red.

 

@Anonymous,

 

Change it as follows.

Measure =
MAXX (
    FILTER (
        ALLSELECTED ( 'price table'[price max] ),
        'price table'[price max] < MAX ( 'price table'[price max] )
    ),
    'price table'[price max]
)
    + 0
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Perfect, Thanks!

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.