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
Hello All,
How to get the difference between two weeks, below is the example
Try this solution. In this example, the data table is WeekDiff.
Create calculated table:
WeekDiffDates = VALUES ( WeekDiff[Date] )
Create a relationship between WeekDiffDates and WeekDiff.
Create measures:
Count of Country = COUNT ( WeekDiff[Country] )
Difference =
VAR vDate =
MAX ( WeekDiffDates[Date] )
VAR vCurrentCount = [Count of Country]
VAR vPrevDate =
CALCULATE ( MAX ( WeekDiffDates[Date] ), WeekDiffDates[Date] < vDate )
VAR vPrevCount =
CALCULATE ( [Count of Country], WeekDiffDates[Date] = vPrevDate )
VAR vResult = vPrevCount - vCurrentCount
RETURN
vResult
In the matrix, columns should be WeekDiffDates[Date]:
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 26 | |
| 16 | |
| 11 | |
| 10 |