Forum Discussion
Inserting records from source with DAX
- 4 years ago
This doesn't sound like it has anything to do with inserting or DAX...
I can't tell for sure but it sounds like you might be trying to create a cross join (a.k.a Cartesian product) of Names and Quarters.
https://radacad.com/cartesian-product-in-power-query-multiply-all-sets-of-all-pairs-in-power-bi
Lets say I am trying geting data from a new source 3 names.
Larry
Mary
Mark
I need to add some calcuated dates for each name per quarter. Like this
Larry 1/1/2022
Larry 4/1/2022
Larry 7/1/2022
Larry 10/1/2022
Mary 1/1/2022
Mary 4/1/2022
Mary 7/1/2022
Mary 10/1/2022
Mark 1/1/2022
Mark 4/1/2022
Mark 7/1/2022
Mark 10/1/2022
I know I can apply the dates with something like this Date.AddQuarters(Date.StartOfYear(Date.From(DateTime.FixedLocalNow())),0)
but I dont know how to loop and itirate each name so it comes out that way when I am inserting the rows.
Let me know if this make sense.
This doesn't sound like it has anything to do with inserting or DAX...
I can't tell for sure but it sounds like you might be trying to create a cross join (a.k.a Cartesian product) of Names and Quarters.
https://radacad.com/cartesian-product-in-power-query-multiply-all-sets-of-all-pairs-in-power-bi