Hi All
I could tackle this using measures but for various reasons I prefer to create a table in my Model, and do it using Dax. Here is a simple example table which shows a list of sales orders, the price of that sales order and the dates the service will be delivered
Sales Order | From | To | Amount |
---|---|---|---|
SalesOrder1 | 15/01/2019 | 30/01/2019 | 50000 |
SalesOrder2 | 17/02/2019 | 25/02/2019 | 25000 |
SalesOrder3 | 15/05/2019 | 30/10/2019 | 3000 |
SalesOrder4 | 15/09/2019 | 30/10/2019 | 10000 |
SalesOrder5 | 15/03/2019 | 30/04/2019 | 6000 |
SalesOrder6 | 15/01/2019 | 02/02/2019 | 100000 |
I would like to arrive at this output in a table
SalesOrder | Date | Amount |
---|---|---|
SalesOrder1 | 15/01/2019 | 3,125 |
SalesOrder1 | 16/01/2019 | 3,125 |
SalesOrder1 | 17/01/2019 | 3,125 |
SalesOrder1 | 18/01/2019 | 3,125 |
SalesOrder1 | 19/01/2019 | 3,125 |
SalesOrder1 | 20/01/2019 | 3,125 |
SalesOrder1 | 21/01/2019 | 3,125 |
SalesOrder1 | 22/01/2019 | 3,125 |
SalesOrder1 | 23/01/2019 | 3,125 |
SalesOrder1 | 24/01/2019 | 3,125 |
SalesOrder1 | 25/01/2019 | 3,125 |
SalesOrder1 | 26/01/2019 | 3,125 |
SalesOrder1 | 27/01/2019 | 3,125 |
SalesOrder1 | 28/01/2019 | 3,125 |
SalesOrder1 | 29/01/2019 | 3,125 |
SalesOrder1 | 30/01/2019 | 3,125 |
SalesOrder2 | 17/02/2019 | 2,778 |
SalesOrder2 | 18/02/2019 | 2,778 |
SalesOrder2 | 19/02/2019 | 2,778 |
SalesOrder2 | 20/02/2019 | 2,778 |
SalesOrder2 | 21/02/2019 | 2,778 |
SalesOrder2 | 22/02/2019 | 2,778 |
SalesOrder2 | 23/02/2019 | 2,778 |
SalesOrder2 | 24/02/2019 | 2,778 |
SalesOrder2 | 25/02/2019 | 2,778 |
SalesOrder3 | 15/05/2019 | 18 |
… | … | … |
I have tried the following (amongst other things) which demonstrates better what i try to do (I can figure out easy how to put amount in there so just focusing on getting dates)
SUMMARIZECOLUMNS(
Test[Sales Order],Test[From],Test[To],
"Series",GENERATESERIES(MAX(Test[From]),MAX(Test[To]),1)
)
The key here is i dont want a Cross join table with every single date/Sales order combination possible as it will be huge.
I would be hugely grateful if anyone has a nice solution to this or let me know if something similar is in Sam’s resources that i perhaps missed.
Thanks in advance for reading
James