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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
orenji88_HON
Frequent Visitor

Get Slicer Between Min and Max value based on Filter

Hi,

I have a Between Slicer that contains a Minimum Value and Maximum Value from a table, let's say [Revenue].

I managed to get the minimum and maximum value without any filter, but when I tried to filter by Country for example, the Min and Max value stays the same like before the filter was applied.

 

For Example :

Without Any filter
Min : -704.52

Max : 38,858.0

orenji88_HON_0-1635407636487.png

 

With Country A Filter, should be looked like

Min : 3,000

Max : 10,000

orenji88_HON_1-1635407894897.png

But somehow it stays like no any filter applied. Min stays in -704.52, and Max stays in 38,858.

 

I tried using ALLSELECTED but it seems not working.

Please help. Thanks.

 

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

Hi @orenji88_HON ,

 

It works fine on my side. You don't need to create any calculation tables or measures.

8.png9.png

 

If you insist on using calculation tables and metrics, you can also succeed. I set it up as follows. I put the Slicer Filter into the filter of the slicer view.

10.png11.png

 

 

 

Best Regards,

Stephen Tao

 

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

6 REPLIES 6
v-stephen-msft
Community Support
Community Support

Hi @orenji88_HON ,

 

It works fine on my side. You don't need to create any calculation tables or measures.

8.png9.png

 

If you insist on using calculation tables and metrics, you can also succeed. I set it up as follows. I put the Slicer Filter into the filter of the slicer view.

10.png11.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

speedramps
Super User
Super User

Hi orenji88_HON

 

Add  a measure

 

Has revenue = 
INT(
    NOT(
        ISEMPTY(Revenue)
   )
)

 

Then on your date slicer add the filter

Has revenue = 1

 

 

How this works:-

You can't use true/false indicator in a filter but you can use an integer.

So the measure checks which dates records are on the Revenue table for the sliced country.
It then converts the true/false answer to an integer.


Remember we are BI community voluntrees so please click the thumbs-up for me taking the trouble to help you and then accept the solution if it works.  Thank you !

 

 

It doesn't work somehow for me.

 

Perhaps, I might give a bit more detail below.

I created a calculated table for Min and Max based on my Revenue.

 

P = 
VAR Virtual = 
 SUMMARIZE( Summary, [Country], Summary[Sales Document], Summary[Revenue] ) 

VAR MinValue = MINX(Virtual, Summary[Revenue]) 
VAR MaxValue = MAXX(Virtual, Summary[Revenue]) 

RETURN 
GENERATESERIES(MinValue, MaxValue, 1)

 

 

Then I create a Measure in Summary Table. This is an indicator like yours, using 1 and 0.

 

Slicer Filter = 
VAR Virtual = 
 SUMMARIZE( Summary, [Country], Summary[Sales Document], Summary[Revenue] ) 

VAR MinValue = MINX(Virtual, Summary[Revenue]) 
VAR MaxValue = MAXX(Virtual, Summary[Revenue]) 
VAR CurrentSlicerValue = SELECTEDVALUE(P[Value])

RETURN 
IF(
    CurrentSlicerValue >= MinValue && CurrentSlicerValue <= MaxValue,
    1,
    0
)

 

I set this measure as filter to the Between Slicer, and set it to 1.

 

The Between Slicer runs well without any filter.

orenji88_HON_0-1635411052863.png

 

But, if I apply a Country Filter, The Min and Max value won't changed to that specific country I chose.

orenji88_HON_1-1635411076997.png

 

 

amitchandak
Super User
Super User

@orenji88_HON , the Range filter does not adjust to the selected value. Check if enabling interaction can help. But I doubt that

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I did enable the Interaction between my Country Filter and the Between Slicer. But, it won't changed at all.

@orenji88_HON , I doubt range takes a filter from other slicers. you can log an idea

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.