Forum Discussion
Adding Row data in new Column
- 4 years ago
You want to calculate the increase/decrease between which two different dates? Every date and its previous date? If so, you can first duplicate the query.
Then in the duplicated table, add a custom column to get the previous date.
Date.AddDays([Date],-1)Then merge queries to bring data from the original table into the duplicated table. Hold on Ctrl key and select "Previous Date" & "Item" columns as matching columns in duplicated table. In the second table, select "Date" and "Item" columns.
Expand the merged table column and select "Inventory" to add to the duplicated table.
You can then calculate the difference between two inventory columns to get the daily decrease/increase amount.
If you don't want to bring two tables' data into the data model, you can uncheck "Enable load" option for the original table.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Each Calendar day has 1000+ rows which are distinct. Kind of Inventory details. For every row item i need a difference. Increase in inventory for every material.
You want to calculate the increase/decrease between which two different dates? Every date and its previous date? If so, you can first duplicate the query.
Then in the duplicated table, add a custom column to get the previous date.
Date.AddDays([Date],-1)
Then merge queries to bring data from the original table into the duplicated table. Hold on Ctrl key and select "Previous Date" & "Item" columns as matching columns in duplicated table. In the second table, select "Date" and "Item" columns.
Expand the merged table column and select "Inventory" to add to the duplicated table.
You can then calculate the difference between two inventory columns to get the daily decrease/increase amount.
If you don't want to bring two tables' data into the data model, you can uncheck "Enable load" option for the original table.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.