Forum Discussion
hackfifi
8 years agoHelper V
Create Duplicate Entries based on Column Value
Good Day - I have a table in PowerBI Query as DATA [shown below] I am trying to convert that DATA to OUTPUT [shown below] In summary, Each ROW needs to be duplicated based on COUNT value, and ID Co...
- 8 years ago
Hi hackfifi
You could try this calculated table in DAX
Table 2 = GENERATE( 'Table', FILTER( SELECTCOLUMNS( GENERATESERIES(1,100), "ID",[Value] ), [ID]<=[Count]) )This gave me this result
hackfifi
8 years agoHelper V
Ok Phil_Seamark - So i am doing SOMETHING wrong. Obviously the below the "REAL" data, not the SAMPLE table i provided earlier. As you can see each row has count value of "19" in this case. Hence the generated table should show each row 19 times i.e. it should have 57 rows of data
Phil_Seamark
8 years agoMicrosoft Employee
- hackfifi8 years agoHelper V
Yes the "Count" column on Main Table is of Type "Whole Number"....
Maybe i will import the data and start again