Forum Discussion
hdsogno
6 years agoHelper I
Calculating Period over Period
Hi All - Having trouble calculating percentage difference between periods. I have 2 tables, 1 with Dates and 1 with Product data, Customers and Dates. In the report are 1 Slicer for months and 1 Ma...
- 6 years ago
hdsogno , this will come by time intelligence using this year vs last and their diff. Power Bi do not have column diff.
Can you share actual data on which you need this, make me @
amitchandak
6 years agoSuper User
Create a date calendar, Have these months these and try Year formula, It should respond to month filter
This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/31"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/