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
fkeuroglian
Helper I
Helper I

Generate Series input value

Hi Expert

I have a strange situation

Generate a series 

Ventana = GENERATESERIES(0, 9999, 1)
 
I want the user put the input value and then get the value and do some calculations.
The problem is when the user put 1000, the value show 999, when the user put 2000, the value show 1998
But if the user put 100, the value is OK, if the user put 200, the value is OK
 
Any idea?
Thanks
errorPBI.JPG
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You have fallen victim to the sampling monster.

lbendlin_0-1628173515871.png

 

Nothing you can do about it - except for using (much) smaller ranges or larger interval steps.

View solution in original post

12 REPLIES 12
martinmichalsky
Frequent Visitor

Hello, I know this post is a little older but today a customer of mine had the same issue and I come up with a work around, which may help others as well. 

The problem is not with value generating, but with Slicer using Selected value selection. 

You can change it to different Options - Style, like Greater then or equal to

martinmichalsky_0-1689324073657.png

Then adjust the measure which was generated to use MIN(), instead of SELECTEDVALUE()

martinmichalsky_1-1689324107436.png

Slicer will now contain 2 boxes, where 1 is showing maximal value you can chose. 

martinmichalsky_2-1689324186746.png

You can then play with formatting, or overlay 2nd box with white rectangle to hide it. 

martinmichalsky_3-1689324233795.pngmartinmichalsky_4-1689324249175.png



Please mark my post as a solution in case it helped. 

BR

Martin 

worked as a charm, kudos 🌋

lbendlin
Super User
Super User

keep doing what you are doing - that's what the "what-if"  feature is for.

lbendlin
Super User
Super User

You still see the "I"  warning even with 1000 at step 1

lbendlin_0-1628174957677.png

Change the step to 5

lbendlin_1-1628175001231.png

It's not a bug, it's a feature.  Seriously  - there is no way the visual can cram 1000 data points onto your screen. Not enough pixels.

 

Thanks for all the explanation

But how would be to create a INPUT VALUE and give the user these options an posibility ?

Hi @fkeuroglian ,

 

I found a similar thread which may explain the strange senario:

The reason why some of the numbers don't appear and revert back to another number when entered is due to PBI sampling the data, the range that you are using is to big.

https://community.powerbi.com/t5/Desktop/GENERATESERIES-not-selecting-certain-number-in-the-range/m-...

When you set a large range using GENERATESERIES,and when you select the number which is ranking over 1000*increment ,it will be sampled.As you tested before,the workaround to solve it is to choose a bigger increment,for example,in your senario,you set a series from 1 to 10000 with an increment 1,and you select 1000,which is ranking 1000,that's why you get a result of 999,which is a sampled result.

See:

vkellymsft_2-1628231311663.png

 

 

When you change the increment to any value bigger than 1(should be an integer,decimal situation would be more complex),which will ensure that the selected value is below the ranking of 1000,and you will get the expected result:

vkellymsft_1-1628230992823.png

 

Best Regards,
Kelly

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

 

lbendlin
Super User
Super User

You have fallen victim to the sampling monster.

lbendlin_0-1628173515871.png

 

Nothing you can do about it - except for using (much) smaller ranges or larger interval steps.

If i down the sample from 10.000 to 2.000 have the same problem

 

IF i put the 1000 samples, have problems when i put 5, give me 4 for the result

 

Bug?

fkeuroglian
Helper I
Helper I

Hi, of course

 

see the pbix attached in the drive

 

https://drive.google.com/file/d/1Xi7LbWOd6TepN0MGjhMffLbHoRHi9M26/view?usp=sharing

 

Try to put the value 1000 in the input

 

Thanks a lot, Fernando

 

 

 

 

lbendlin
Super User
Super User

How is the GENERATESERIES table related to the user input?  Did you create some "What if?"  parameter?

Hi!

First created manually the same "what if" parameter structure, and then try create a What if parameter, but using the what if parameter have the same problem

the result is a "table" with this two fields:

1)List of values result with the generate series

2) field that get the value: 

Value = SELECTEDVALUE('Table'[listavalue])
 
Thanks!

That sounds correct.  Would you be able to post a sample pbix file?

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.