Forum Discussion
Anonymous
3 years agoNot applicable
Power BI running total from PWA data
Hi Team, I am trying to create a cashflow dashboard in Power BI for the total cost from a set of PWA data. I have Power BI attached to the database and have created the below DAX code having follow...
Ashish_Mathur
Super User
3 years agoHi,
This pattern should work.
- Create a Calendar Table and write calculated column formulas for Year, Month name and Month number. Sort the Month name by the Month number
- Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table
- To yoru visual, drag Project, Year and Month name from the Calendar Table
- Write these measures
Total = sum(Data[Total])
Total YTD = calculate([Total],datesytd(Calendar[Date],"31/12"))
The YTD calculation would restart in January each year.
Hope this helps.
Anonymous
3 years agoNot applicable
Thanks I will give that a shot.
As my daata already has Time by day in the table could I use that perhaps or am i trying to overcomplicate this...?
- Ashish_Mathur3 years ago
Super User
You are welcome. You will need a proper date column (without a time stamp)