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
mrothschild
Continued Contributor
Continued Contributor

Help with using percentages in Slider Slicers

 

tl;dr - other than slicing the visual (that uses a decimal input because it's a percentage to 3 decimal places) to the same number and even then only when using the slider - everything is working as intended.  I need help with programming a workaround.  I assume these are iterations of either using ROUND() and/or FORMAT() and/or multiplying the underlying data by 10,000 and treating them as whole numbers, and then re-dividing into a calculated column.

 

____________________

I have a Between Slicer with a slicer that displays decimal figures in percentage format to 3 decimal places, i.e., 0.###%.

 

1.PNG

 

The output measure is supposed to be the average of these two "inputs".

 

_CALC = 

VAR max_lrf = MAXX(ALLSELECTED('Parameters - LRF'[LRF (calc)]),'Parameters - LRF'[LRF (calc)])
VAR min_lrf = MINX(ALLSELECTED('Parameters - LRF'[LRF (calc)]),'Parameters - LRF'[LRF (calc)])

VAR lrf = IF((max_lrf + min_lrf)=0, min_lrf, (max_lrf + min_lrf) / 2)

RETURN
lrf

 

When I constrain the slider to a figure. . . 

 

2.PNG

 

the output measure works:

 

4.PNG

 

but when I constrain the slicers to one number - using the slider (not manually inputting) . . . 

 

3.png

 

the measure returns 0 (when it should show 1.1%).

 

5.PNG

The reason - I suspect - is that the "inputs" necessarily have to be decimal numbers due to the decimal places required.  Hence the slider "inputs" as opposed to manual, are not rounded to match and throwing off an error.

 

7.png8.png

 

You'll note the whole number slicer to the right above.  I have no similar errors with that slicer.  Similarly, if I manually input 0.0112 into the top and bottom of the slicer, the measure outputs correctly.

 

I'm happy to employ a workaround with rounding/formating, etc. but these slicers are from Parameter tables linked to the underlying data table, so I'm having a bit of trouble with the programming.  

 

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @mrothschild ,

Please check whether you got the similar situation with the one in the following threads:

Rounding issue in "What if" Parameters

What-if parameters do not work due to 1002 sampling limit on slicer visual

Best Regards

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

On other measures, where I have fewer than 1002 individual figures, I'm still getting the issue when using the sliders to select a number if it's in formated as a percent in the slicer - even when formatted as fixed decimal as a column.  

amitchandak
Super User
Super User

@mrothschild , I created a file and check this issue, I am getting issue only when the _CALC  has less decimal places

 

 

amitchandak
Super User
Super User

@mrothschild , Create these two as measures and check what value you are getting when both values are equal

 

MAXX(ALLSELECTED('Parameters - LRF'[LRF (calc)]),'Parameters - LRF'[LRF (calc)])

 

MINX(ALLSELECTED('Parameters - LRF'[LRF (calc)]),'Parameters - LRF'[LRF (calc)])

Hi @amitchandak 

 

The new measures both return zero if they're slid to the same point.  They return the intended output if manually entering the same number.

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.