Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Friends,
I am having below excel data,
How can we calculate difference between total sales values with regrads to current date and previous last date in table.
@Neal369 , Select the distinct date in a new table and add rank column on date
Dates = distinct(Table[reportingDate])
Add Rank, column
rank = rankx(Dates , Dates[reportingDate] ,,asc,dense)
join reporting date of both tables
Then use measures like
This date= CALCULATE(sum('Table'[sales]), FILTER(ALL('Dates'),'Dates'[rank ]=max('Dates'[rank])))
Last date= CALCULATE(sum('Table'[sales]), FILTER(ALL('Dates'),'Dates'[rank ]=max('Dates'[rank])-1))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |