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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi everyone,
Is there anyway to show the difference between years? Both Years/Months are in the same table, can someone please advise?
Solved! Go to Solution.
Hi @sraj,
You can try measure as:
Measure =
IF(
HASONEVALUE('Table'[Date]),
MAX('Table'[Sales]),
CALCULATE(
MAX('Table'[Sales]),
FILTER(
'Table',
YEAR('Table'[Date])=2021)
)-
CALCULATE(
MAX('Table'[Sales]),
FILTER(
'Table',
YEAR('Table'[Date])=2020)
)
)
Here is the output:
The pbix is attached.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @sraj,
Is this what you want?
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Yes, exactly this but the difference not the total.
Hi @sraj,
You can try measure as:
Measure =
IF(
HASONEVALUE('Table'[Date]),
MAX('Table'[Sales]),
CALCULATE(
MAX('Table'[Sales]),
FILTER(
'Table',
YEAR('Table'[Date])=2021)
)-
CALCULATE(
MAX('Table'[Sales]),
FILTER(
'Table',
YEAR('Table'[Date])=2020)
)
)
Here is the output:
The pbix is attached.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Got it, thank you very much for your help!
Hi,
In the Row labels, show only the Month (not YearMonth). Furthermore, you should have a Calendar Table with a relationship from the Date column of your Data Table to the Date column of your Calendar Table. In your Calendar Table, write calculated column formulas to extract Year and YearMonth. To your visual, drag Year and YearMonth from the Calendar Table.
@sraj , the display you want needs month and year separately so that it can combine.
How do you want to diff between year and month?
You need to have a year month table, I sometimes create date from the year month and use date table. But you need separate table
Add month rank as column in table on year month
Month Rank = RANKX(all('Date'),'Date'[Month Start date],,ASC,Dense)
Month Rank = RANKX(all('Date'),'Date'[Year Month],,ASC,Dense)
This Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])))
Last Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])-1))
Last Year same month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Month]=max('Period'[Month]) && 'Date'[Year]=max('Date'[Year])-1))
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 57 | |
| 52 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 116 | |
| 105 | |
| 41 | |
| 34 | |
| 25 |