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
Anonymous
Not applicable

GENERATESERIES with dynamic value

I would like to pass a dynamic end value to the GENERATESERIESE function.

I have an imported (not calculated table), one of its collumns contains the numbers that i would like to use as the end value in the function. The idea is this:

nonoka_0-1655110130364.png

I tried to pass with VALUE, VALUES, SELECTEDVALUE, but I could not make them work. I'm fine with using something else than generateseries, as long as the output table looks like the one on the picture. I have to do his on the fly, Power Query is not an option.

Any ideas?

 

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

 

1 ACCEPTED SOLUTION

Goodmorning @Anonymous 
Calculated tables cannot read the filter context. What are you trying to acheive is not possible. 
I would suggest to create a completely new table as follows https://www.dropbox.com/t/2rv9ENz3TZdvyAXQ

1.png2.png

View solution in original post

8 REPLIES 8
NickolajJessen
Solution Sage
Solution Sage

NickolajJessen_0-1655112936242.png



NickolajJessen_1-1655112993022.png

 

Anonymous
Not applicable

Could you please show me what is in the Series.Value measure? The code does not work on my end.

Not a measure. just:

GENERATESERIES(1,100,1)

The trick is, that i'm not passing any dynamic parameter into it.
I'm just using the drill through function to get a single Title and using MAX() to get the word count of the selected title.

and from there it's easy to use the measure on the filter and sort away any number from the GENERATE series table, that is below the MAX() measure

tamerj1
Super User
Super User

Hi @Anonymous 
I believe I can help on this. Please explain what is your ultimate goal and what are the expected results?

Anonymous
Not applicable

The "Num" table will serve as a base for an other function, that will split the title sentences to words.

The "Num" table is just a list of numbers starting from 1 and ending with 100 (for example).

 

The problem with this is that when I visualize the table I will get the words, but also additional empty lines, because the tables length will be exactly 100 rows (the user will scroll through empty rows --> not uder friendly ). In addition, if there are more than 100 words in the title, then not all words will be shown.

 

My goal is to create the 'Num' table exactly as long as the amount of words in the given title.

@Anonymous 
How are these words seperated? By spaces or commas? Can you provide a dammy sample with what are you expecting as a final result?

Anonymous
Not applicable

Goodmorning @Anonymous 
Calculated tables cannot read the filter context. What are you trying to acheive is not possible. 
I would suggest to create a completely new table as follows https://www.dropbox.com/t/2rv9ENz3TZdvyAXQ

1.png2.png

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.