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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
martaTr
Frequent Visitor

Week over Week difference

hi all, probably this is super easy, but i struggle with it, i need to present on below matrix table difference week over week just for the last two periods (in below between 20 and 27 march), so it basically should show me -22 etc. i did it in excel but we moved to power bi. this is a count of lines. i also have the same with sum of import. 

 

martaTr_0-1712332139535.png

martaTr_2-1712332343344.png

 

martaTr_1-1712332282227.png

could you please help me how to do it? i tried with calculate and max or with dates in period. but it shows me strange results.

 

2 REPLIES 2
adudani
Super User
Super User

hi @martaTr ,

 

if you have a weeknum column in your dataset, that maybe used. ( for more context: How to Calculate Week over Week Change in Power BI (youtube.com)

 

OR,

 

you could explore if the (52) Calculate Growth From Previous Non Consecutive Date - YouTube may be a better fit.

 

Another alternative maybe to explore DATEADD function (DAX) - DAX | Microsoft Learn

 

Kindly provide a sample input table masking sensitive data if this doesn't work for you.

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

thank you, it seems like it's working, however i am wondering how can i this new metric WoW add to the table. 

Here is my formula:

 

Measure3 = 
VAR LastDate1 =
    MAXX ( ALLSELECTED ( Affinity[As of Date] ), Affinity[As of Date] )
VAR LastSales =
    CALCULATE (
        COUNT ( [Importo] ),
        FILTER ( ALL ( Affinity[As of Date] ), Affinity[As of Date] = LastDate1 )
    )
VAR PrevDate =
    MAXX (
        FILTER ( ALL ( Affinity[As of Date] ), 'Affinity'[As of Date] < LastDate1 ),
        Affinity[As of Date]
    )
VAR PrevSales =
    CALCULATE (
        COUNT ( [Importo] ),
        FILTER ( ALL ( Affinity[As of Date] ), Affinity[As of Date] = PrevDate )
    )
RETURN
    IF ( ISBLANK ( PrevDate ), BLANK (), LastSales - PrevSales )

 

Unfortunately it doesnt work when i normally add it to columns/ rows/values.Now it's in seprate table hidden under a main one which doesnt look good and it 's completely impractical. Any ideas how to present that metric? maybe other chart? 

martaTr_0-1713526999831.png

 

Helpful resources

Announcements
Join our Fabric User Panel

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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.