Forum Discussion
Cash flow Dashboard
- 1 year ago
Your expected result is a bit confusing. For Plot1, both January and February 2025 have 4 weeks of Design, so their values should be the same but your result shows otherwise. That aside, assuming the weekly spend should be plotted at the end of each week starting from the Design or Construction start date (e.g., a Design start of Jan 1, 2025 would place the first point on Jan 7), you can try the following formula.
Note: Dates refers to a disconnected calendar table that spans from the earliest to the latest of all relevant date columns.Weekly Design Spend = VAR SummaryTable = SUMMARIZE ( Data, Data[Plot No], Data[Phase], Data[Design Start Date], Data[Weekly rate], Data[Design Duration] ) VAR _GeneratedTable = GENERATE ( SummaryTable, ADDCOLUMNS ( GENERATESERIES ( 1, [Design Duration], 1 ), "@End of Week", [Design Start Date] + ( [Value] * 7 ) - 1 ) ) VAR _FilteredTable = FILTER ( _GeneratedTable, [@End of Week] IN VALUES ( Dates[Date] ) ) RETURN SUMX ( _FilteredTable, [Weekly rate] )Please see the attached pbix.
Can you please show a drawing of what you want to achieve?
Hi, As an example I've used Plot 1 and Plot 10.
I need the table to become this:
| Plot No | Cost Type | Date | Spend |
| Plot 1 | Design | 01/01/2025 | 28947.37 |
| Plot 1 | Design | 08/01/2025 | 28947.37 |
| Plot 1 | Design | 15/01/2025 | 28947.37 |
| Plot 1 | Design | 22/01/2025 | 28947.37 |
| Plot 1 | Design | 29/01/2025 | 28947.37 |
| Plot 1 | Design | 05/02/2025 | 28947.37 |
| Plot 1 | Design | 12/02/2025 | 28947.37 |
| Plot 1 | Design | 19/02/2025 | 28947.37 |
| Plot 1 | Design | 26/02/2025 | 28947.37 |
| Plot 1 | Construction | 05/03/2025 | 28947.37 |
| Plot 1 | Construction | 12/03/2025 | 28947.37 |
| Plot 1 | Construction | 19/03/2025 | 28947.37 |
| Plot 1 | Construction | 26/03/2025 | 28947.37 |
| Plot 1 | Construction | 02/04/2025 | 28947.37 |
| Plot 1 | Construction | 09/04/2025 | 28947.37 |
| Plot 1 | Construction | 16/04/2025 | 28947.37 |
| Plot 1 | Construction | 23/04/2025 | 28947.37 |
| Plot 1 | Construction | 30/04/2025 | 28947.37 |
| Plot 1 | Construction | 07/05/2025 | 28947.37 |
| Plot 10 | Design | 18/06/2028 | 33153.4 |
| Plot 10 | Design | 25/06/2028 | 33153.4 |
| Plot 10 | Design | 02/07/2028 | 33153.4 |
| Plot 10 | Design | 09/07/2028 | 33153.4 |
| Plot 10 | Design | 16/07/2028 | 33153.4 |
| Plot 10 | Design | 23/07/2028 | 33153.4 |
| Plot 10 | Design | 30/07/2028 | 33153.4 |
| Plot 10 | Design | 06/08/2028 | 33153.4 |
| Plot 10 | Design | 13/08/2028 | 33153.4 |
| Plot 10 | Construction | 01/01/2025 | 33153.4 |
| Plot 10 | Construction | 08/01/2025 | 33153.4 |
| Plot 10 | Construction | 15/01/2025 | 33153.4 |
| Plot 10 | Construction | 22/01/2025 | 33153.4 |
| Plot 10 | Construction | 29/01/2025 | 33153.4 |
| Plot 10 | Construction | 05/02/2025 | 33153.4 |
| Plot 10 | Construction | 12/02/2025 | 33153.4 |
| Plot 10 | Construction | 19/02/2025 | 33153.4 |
| Plot 10 | Construction | 26/02/2025 | 33153.4 |
| Plot 10 | Construction | 05/03/2025 | 33153.4 |
| Plot 10 | Construction | 12/03/2025 | 33153.4 |
| Plot 10 | Construction | 19/03/2025 | 33153.4 |
| Plot 10 | Construction | 26/03/2025 | 33153.4 |
- Fali3241 year agoHelper II
and the visuals I want to create are:
so the weeks inbetween the start and end date need to be automatically generated.
- danextian1 year agoSuper User
Your expected result is a bit confusing. For Plot1, both January and February 2025 have 4 weeks of Design, so their values should be the same but your result shows otherwise. That aside, assuming the weekly spend should be plotted at the end of each week starting from the Design or Construction start date (e.g., a Design start of Jan 1, 2025 would place the first point on Jan 7), you can try the following formula.
Note: Dates refers to a disconnected calendar table that spans from the earliest to the latest of all relevant date columns.Weekly Design Spend = VAR SummaryTable = SUMMARIZE ( Data, Data[Plot No], Data[Phase], Data[Design Start Date], Data[Weekly rate], Data[Design Duration] ) VAR _GeneratedTable = GENERATE ( SummaryTable, ADDCOLUMNS ( GENERATESERIES ( 1, [Design Duration], 1 ), "@End of Week", [Design Start Date] + ( [Value] * 7 ) - 1 ) ) VAR _FilteredTable = FILTER ( _GeneratedTable, [@End of Week] IN VALUES ( Dates[Date] ) ) RETURN SUMX ( _FilteredTable, [Weekly rate] )Please see the attached pbix.
- Fali3241 year agoHelper II
Hi Thank you for the solution it was exactly what I was after