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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
josh_cole
Regular Visitor

0's arent 0's when using a what if parameter and sliders

Im getting stumped.  I am using sliders linked to What If parameters to be able to manipulate underlying data.  In this case, it is looking at the affect of changing dues rates on overall income.  In the photo "Adjust 1" you can see that my two columns are off slightly, but should be the same when the slider is set to 0 (ie, Im not adjusting anything).  I finally was able to determine in the pic "Adjust 2" that when set to 0, its not actually at 0, but rather .049999999.  I have also included the formulas from the What If in pics "Adjust 3" and "Adjust 4" but in my mind, I am not seeing anything that could generate .0499999.  How do I zero this out?

 

adjust 4.pngadjust 3.pngAdjust 2.pngAdjust 1.png

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

Hi  @josh_cole ,

 

If you put  "Table 2 = GENERATESERIES(-50.00,50.00,.01)" in a table expression,you will see below:
If you generate numbers using a floating-point value,this can result in numbers that are not accurate for your needs.

Annotation 2020-07-22 173236.png

That is the problem.

Modify your measure as below:

 

Basic dues Adjustment = SELECTCOLUMNS (
    GENERATESERIES (-50,50,.01),
    "Value", CURRENCY ( [Value] ))

 

And you will see:

Annotation 2020-07-22 174128.png

Here is the reference:
 
 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi  @josh_cole ,

 

If you put  "Table 2 = GENERATESERIES(-50.00,50.00,.01)" in a table expression,you will see below:
If you generate numbers using a floating-point value,this can result in numbers that are not accurate for your needs.

Annotation 2020-07-22 173236.png

That is the problem.

Modify your measure as below:

 

Basic dues Adjustment = SELECTCOLUMNS (
    GENERATESERIES (-50,50,.01),
    "Value", CURRENCY ( [Value] ))

 

And you will see:

Annotation 2020-07-22 174128.png

Here is the reference:
 
 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

@v-kelly-msft thank you so much for that.  That was exactly what I needed.  I am quite certain I never would have been able to figure that out on my own or to even be able to ask it in such a way that Google would have returned something relevant

 

@v-kelly-msft ,

Although its mostly better, when I have the slider set to Zero, its now really .05.  I adjusted the series so that it starts at 0 and goes to 50 and I can truly zero it out.  If I have the series run -50, 50, Zero on the slider is actually .05 now.  Any idea how to get the slider to truly be zero in this case?

Hi  @josh_cole ,

 

Put your expression in a table then check whether 0 inside your series?

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@josh_cole , Not very clear. But if you moved slicer a bit the value can change. While without decimal can still show 0.  as .049 < .5

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.