Forum Discussion
Anonymous
6 years agoNot applicable
Table visual
I am struggling with creating a table visual. I want to show the total sales (coin-in) by day for the current month along with prior year same day for each of these days. I only want to show the cu...
- 6 years ago
Make sure you have date calendar and you use trailing 1-year measure
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
in case you are looking for same weekday that is 364 days behind
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))
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/