Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BhagatRansi
Frequent Visitor

Week over week per Produkt

Dear PowerBI Community,

 

I have an issue and dont know how to solve it. Perhaps someone here has an idea.

 

The challenge is the following I want to calculate the week over week performance across all products but only if in both weeks products have been sold.

BhagatRansi_0-1663761232321.png

Wished result would be:

 

ProductPrevious WeekRelevant Current Week
Product A  
Product B105110
Product C  
Product D9595
Total200205

 

So check if there is a value in the prevous week if yes then select current week value else blank.

Also the other way around check if there is a previous week value and a current week value if true then show previus week value if there is no value for current week then leave relevant previous week value blank.

 

Looking forward to get some ideas

 

2 REPLIES 2
BhagatRansi
Frequent Visitor

Hi Amit,

 

unfortunately that solution is not sufficient. That brings me back to where I was as you can see:

BhagatRansi_0-1663854359542.png

 

I would need it like decribed per product and only select values if in both week there is a measure.

 

Is that possible?

 

Thanks for the support! 

BR, Bhagat

amitchandak
Super User
Super User

@BhagatRansi , Does you raw data have YYYYWW (year week) or date, Then you can use date/year week table and week rank

 

new columns 

 

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)    
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense)    //YYYYWW format

 

 

measures
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))

 

diff % = divide([This week] - [Last Week], [Last Week])

 

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-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.