Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

what-if parameter changes my input

Well known issue:

 

what-if parameter, p:
p = GENERATESERIES(0, 400, 0.01)

 

--> Problem: The selected value will be rounded up or down

 

The problem seems to be fixed for whole numbers, is there a workarround for decimals?

 

(I know the input should be limited to 1000 Values but it is not possible for calculation)

3 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey Anonymous ,

     

    that's because you have more than 1002 values. Then it will take random values in the whole range.

    Check the following article on what exactly is the problems and what alternatives are there:

    Why is it sometimes not possible to select the exact number in the what-if parameter and how can this be solved? - What the fact.bi

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     
  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you Denis for your quick reply.

    Great link! 
    If I use your 2. option of the suggested solution and change the type of slicer to "Less than or equal to" the problem still occurs. 



  • Anonymous's avatar
    Anonymous
    Not applicable

    I have solved this issue based on Denis suggested solution and attached a Rounddown function to it. This means if a user will input 5.00 the float might round up to 5.01 in any visual. To avoid that and other issues I use the rounddown(min(input),2)
    --> 5.00