Forum Discussion
moizsherwani
9 years agoContinued Contributor
Create A Number Table
Hello everyone, So since there is not a way to get a userinput box I am reverting to creating a table of numbers and having the user select via a slicer (they need to select their salary) and I h...
- 9 years ago
Hi moizsherwani,
Try a blank query in the Query Editor and paste this in to the advanced editor
let Source = List.Generate(()=>10000, each _ < 1000000, each _ + 1), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error) in #"Converted to Table" - 9 years ago
Did you try pasting this into the Advanced Editor?
let Source = List.Generate(()=>10000, each _ < 1000000, each _ + 1), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error) in #"Converted to Table" - 9 years ago
I don't recommend creating a DAX calculated table for this, but if you wanted to for fun you could use this:
NumberTable = VAR MinNumber = 10000 VAR MaxNumber = 1000000 RETURN SELECTCOLUMNS ( CALENDAR ( MinNumber, MaxNumber ), "Number", INT ( [Date] ) )
moizsherwani
9 years agoContinued Contributor
The only way I have figured out so far is to do a Power Query -> New Query -> {10000...1000000}
Phil_Seamark
9 years agoMicrosoft Employee
- moizsherwani9 years agoContinued Contributor
PowerBI Desktop
- Phil_Seamark9 years agoMicrosoft Employee
Did you try pasting this into the Advanced Editor?
let Source = List.Generate(()=>10000, each _ < 1000000, each _ + 1), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error) in #"Converted to Table"- moizsherwani9 years agoContinued Contributor
Yes, your solution works perfectly, I am more a DAX fan so was wondering if there was a way to do this in Dax, otherwise your solution is the "BALL"