Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
here is basically what i'm trying to do in the Power Query Editor:
Basically adding a custom sequence for each Col1/Col2 group. I tried adding "Column from Examples" but it seems to only allow inserting values for up to 100 rows and i have more than that. Also it would be much neater to not type the full sequences by hand but use functions similar to adding a custom incremented index column or using List.Generate() etc.
I Table.Split() my table and end up with a list of tables (each one containing all rows per unique Col1/Col2 group) but this step also would only help me if there is e.g. a way to save each individual table in the list to a complete new table in Power Query or being able to add my custom sequence to each table in the list of tables. Both I couldn't figure out to do?
Maybe someone knows or has an alternative idea?!
Best regards
Felix
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]
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..
I can't open the file due to incompability with the version i'm using. Also I can't update the version due to restrictions within the enterprise. If you can explain (or paste code) I'd appreciate that
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |