BlueSky
6 years agoHelper I
Generate a table with incremental values
So I'd like the table below:
Day | Value |
1 | 0 |
2 | 0.5 |
3 | 1 |
4 | 1.5 |
5 | 2 |
I can generate two different tables but can't bring them together, I'm guessing this is pretty simple can someone please help?
Generates a table with Value
GENERATESERIES ( 0, 2, 0.5 )
Generates a table with Day
GENERATESERIES ( 1, 5, 1 )
Thanks
Mark
BlueSky in power query , do the following:
- add a blank query
- click advanced editor
and paste following code
let #"Source" = Table.FromList({1..5}, Splitter.SplitByNothing(),{"index"},null, ExtraValues.Error), #"Added Index" = Table.AddIndexColumn(#"Source", "Factor", 0,0.5), #"Changed Type" = Table.TransformColumnTypes(#"Added Index",{{"index", Int64.Type}}) in #"Changed Type"I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
BlueSky You could do it this way, if you didn't want to do it in M:
Table = ADDCOLUMNS(GENERATESERIES ( 0, 20, 0.5 ) ,"Day", divide([value],0.5)+1)