Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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:

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

 

8 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

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

    • Anonymous's avatar
      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.

      • tamerj1's avatar
        tamerj1
        Community Champion

        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's avatar
      Anonymous
      Not applicable

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

      • NickolajJessen's avatar
        NickolajJessen
        Solution Sage

        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