Forum Discussion
Add custom sequences to table(s)
to know how to do this watch my video
[
t1 = List.Generate(()=> 20,
(x)=> x<= 10000000,
(x)=> x+10),
t2 = if Number.IsOdd([Col3]) = true then t1{[Index]} else t1{[Index]-1}*2][t2]
- Anonymous2 years agoNot applicable
I appreciate your help Ahmed. However, if i understand correctly your solution very much restricts the possible sequences generated in the custom column. Thats why in your example (in the video) you have the sequence for Col3 = 1 -> 30, 50, 70, 90 (so always increments of 20). Hence with this method it wouldn't be possible to recreate the exact scenario from my example picture (50, 40, 20, 200). It get's even worse for me since in reality i have a much more extensive table, meaning for Col3 I have values 1-12 instead of my example where there is only 1-2 so just checking for odd / non-odd numbers won't work either. I don't think there is any way to do what i need in a neat and short formula like you provided.
I found a way that is tedious which is to right-click on each table in my list of tables and "Add as a New Query". Then i can subsequently add Index columns (with custom increments) in each of the "New Queries". But each query basically requires PBI to load the whole data set which is plain stupid and destroys the report performance..