Forum Discussion
Turf03
5 years agoHelper II
Dynamic Summary Page based on new data
I was wondering if there was a way to create a dynamic report or summary page that provides an outline of newly updated data. Kind of like an executive summary in bullet point form showing what ...
Turf03
5 years agoHelper II
Current Year
| Date | Group | Sales |
| 9/22/2020 | Electronics | 5000 |
| 9/23/2020 | Electronics | 4750 |
| 9/24/2020 | Electronics | 6000 |
Last Year
| Date | Group | Sales |
9/24/2019 | Electronics | 4578 |
| 9/25/2019 | Electronics | 3555 |
| 9/26/2019 | Electronics | 5689 |
Id like to show a summary of the sales yesterday including the group.
The difference in sales from the day prior
The difference in sales from the same day last year.
lkalawski
5 years agoResident Rockstar
Hi Turf03
To efficiently compute these values, it is best to create an additional Calendar table and link it to the fact table.
I assume you have one table that contains this data structure:
To calculate the measures described above, use these codes:
Yesterday Sales =
CALCULATE(Sum('Table'[Sales]), 'Calendar'[Date] = TODAY() - 1)
Today Sales =
CALCULATE(Sum('Table'[Sales]), 'Calendar'[Date] = TODAY())
Sales Variance = [Today Sales] - [Yesterday Sales]
LY Sales =
CALCULATE(Sum('Table'[Sales]), 'Calendar'[Date] = DATE(YEAR(TODAY())-1, MONTH(TODAY()), DAY(TODAY())))
I am also sending the .pbix file so you can check how it works.
_______________
If I helped, please accept the solution and give kudos! 😀