cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Power BI Numeric Slicer get low value

Hi,

Trying to get the LOW value of a Numeric Slicer.

When you use SelectedValue in a measure based off your numeric slicer it gives you the HIGH side. Is there something I can add to the DAX to get it to do the low side instead?

TharnageCBT_0-1605543866527.png

Currently using DAX in the measure 2:

Measure 2 = IF(ISFILTERED(Query1[TotalPairs]),SELECTEDVALUE(Query1[TotalPairs]),"BLANK") 
1 ACCEPTED SOLUTION

Hi @TharnageCBT ,

 

If the number in the slicer is not continuous, you may not be able to get the minimum value of the slicer.

For example,here is a sample data, which is not continuous.

V-lianl-msft_0-1605752557547.png

In this case, it does not display the minimum value of the slicer, but the minimum value of the totalpairs column in this range.

Measure = CALCULATE(MIN('Table'[TotalPairs]),ALLSELECTED('Table'[TotalPairs]))

V-lianl-msft_1-1605752600267.png

An alternative is to create a parameter slicer.

Parameter = GENERATESERIES(10, 800, 1)

Create a relationship with totalparis then create mesaure like this.

Parameter Value = CALCULATE(MIN(Parameter[Parameter]),ALLSELECTED(Parameter[Parameter]))

V-lianl-msft_2-1605753211261.png

 

 

Best Regards,
Liang
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

5 REPLIES 5
Frequent Visitor

Im sorry but this wasnt helpful or a solution. DAX is a built in language of PowerBI, its fine to not know it but you should atleast try to replicate the problem to see why I was asking in the first place.

Hi @TharnageCBT ,

 

If the number in the slicer is not continuous, you may not be able to get the minimum value of the slicer.

For example,here is a sample data, which is not continuous.

V-lianl-msft_0-1605752557547.png

In this case, it does not display the minimum value of the slicer, but the minimum value of the totalpairs column in this range.

Measure = CALCULATE(MIN('Table'[TotalPairs]),ALLSELECTED('Table'[TotalPairs]))

V-lianl-msft_1-1605752600267.png

An alternative is to create a parameter slicer.

Parameter = GENERATESERIES(10, 800, 1)

Create a relationship with totalparis then create mesaure like this.

Parameter Value = CALCULATE(MIN(Parameter[Parameter]),ALLSELECTED(Parameter[Parameter]))

V-lianl-msft_2-1605753211261.png

 

 

Best Regards,
Liang
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

Super User II
Super User II

HI @TharnageCBT ,

 

I am not quite sure I understand the issue and what you are showing.  Are you showing that based on the selection there are between 10 and 800 "total pairs" and you want the card to show the "10" and not the "800"?  If that is correct, why not just use "MIN" ?  You can use it in the DAX or you can just put it on the card filter to use the MIN - depending on how else you are using this measure and slicer.

 

I would appreciate Kudos if my response was helpful. I would also appreciate it if you would Mark this As a Solution if it solved the problem. Thanks!




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Yes im looking for what is in the 10 spot. As a numeric slicer it can be any number from the lowest to the highest in that location as well. Where would you put the MIN()? Ive tried it in the SelectedValue and it give a column error, Ive tried it outside the Selectedvalue still gives an error and Ive tried it on the outer of the entire statement. Im looking for a measure that will give the low value of the numeric slicer. I have a measure that gives the high value as I posted before

Hey @TharnageCBT ,

 

I am thinking that you could do in the filter for that card.  OR, if you want to stay in DAX, the command is "MIN([fieldname]).  My DAX isn't that great yet so I would refer you to here:

https://docs.microsoft.com/en-us/dax/min-function-dax

or here:

https://dax.guide/min/

 

(and, there is MinA and MINX as well).

 

If this doesn't guide you I would also refer you to the DAX forum where somebody there would probably know it right off.  If you do abandon this thread to go over to DAX please mark this as solved so folks won't keep trying to answer this for us!

 

Thanks.

I would appreciate Kudos if my response was helpful. I would also appreciate it if you would Mark this As a Solution if it solved the problem. Thanks!

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors