- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Difference between columns coming from same row in matrix
I have a sample data:
Week number | Category | Sales |
1 | MessT | 1234 |
2 | WerkZ | 2345 |
From this I created a matrix table which calculates a sum of sales in a given week. it looks like in a screenshot.
I read docs about how to create a measure with differences between these categories and a % diff, but I am getting blanks. Why is that?
From two tutorials I am trying two columns:
the diff2 column is
Diff2 = CALCULATE(
SUM([items.netRevenue]),FILTER(invoices_granular, invoices_granular[WeekNum]=MAX(invoices_granular[WeekNum])
- CALCULATE(
SUM(invoices_granular[items.netRevenue]),FILTER(invoices_granular,invoices_granular[WeekNum]=MIN(invoices_granular[WeekNum])
))
))
and Difference between Cat is:
Difference btw Cat =
IF (
HASONEVALUE(invoices_granular[WeekNum]),
BLANK(),
CALCULATE(
SUM(invoices_granular[items.netRevenue]),
FILTER(invoices_granular, invoices_granular[WeekNum] = MAX(invoices_granular[WeekNum]))
)
- CALCULATE(
SUM(invoices_granular[items.netRevenue]),
FILTER(invoices_granular,invoices_granular[WeekNum] = MIN(invoices_granular[WeekNum]))
)
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Anonymous , Make sure you have separate week or date table and then try approch like
Have these new columns in Date Table, Week Rank is Important in Date/Week Table
Week Rank = RANKX('Date','Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX('Date','Date'[Year Week],,ASC,Dense) //YYYYWW format
These measures can help
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @amitchandak This is not exactly what I need I think.
I made a separate date table, and changed the formula and still I get blank values.
I want to calculate a difference for categories 0 as in screenshot, sales on 7/7/23 for category Messtechnik are 11k, and for category Werkzeuge are 4,9k. I want the difference to populate and show 6k. Instead I am getting blanks.
I followed tutorials and not sure what I missed

Helpful resources
Join our Fabric User Panel
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Power BI Monthly Update - June 2025
Check out the June 2025 Power BI update to learn about new features.

User | Count |
---|---|
72 | |
70 | |
57 | |
37 | |
35 |
User | Count |
---|---|
85 | |
67 | |
60 | |
46 | |
45 |