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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
arc1412
Regular Visitor

I receive data weekly that is a running total and need to see change weekly

Hi, I recieve a sheet weekly which has many sales peoples name and their year to date total amongst other data.  The sheets have a date stamp that is recognised by powerbi.     I would like to have a dax measure which calculates last weeks sales per advisor (and totals) based on these new ytd totals that arrive weekly.   Any help with this would be greatly appreciated.

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @arc1412 ,

 

You may create measures like DAX below.

 

 

Current Week =
CALCULATE (
    Table1[Sales],
    FILTER (
        Table1,
        Table1[advisor] = MAX ( Table1[ advisor] )
            && YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
            && WEEKNUM ( Table1[Date] ) = WEEKNUM ( MAX ( Table1[Date] ) )
    )
)


Last Week =
CALCULATE (
    Table1[Sales],
    FILTER (
        Table1,
        Table1[advisor] = MAX ( Table1[ advisor] )
            && YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
            && WEEKNUM ( Table1[Date] )
                = WEEKNUM ( MAX ( Table1[Date] ) ) - 1
    )
)

Week Change= [Current Week] -[Last Week]

 

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi  @arc1412  ,

 

Do the suggestions from engineers make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @arc1412 ,

 

You may create measures like DAX below.

 

 

Current Week =
CALCULATE (
    Table1[Sales],
    FILTER (
        Table1,
        Table1[advisor] = MAX ( Table1[ advisor] )
            && YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
            && WEEKNUM ( Table1[Date] ) = WEEKNUM ( MAX ( Table1[Date] ) )
    )
)


Last Week =
CALCULATE (
    Table1[Sales],
    FILTER (
        Table1,
        Table1[advisor] = MAX ( Table1[ advisor] )
            && YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
            && WEEKNUM ( Table1[Date] )
                = WEEKNUM ( MAX ( Table1[Date] ) ) - 1
    )
)

Week Change= [Current Week] -[Last Week]

 

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@arc1412 - I created something for this once - https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Revenue-Reverse-YTD/m-p/373185#M111

 

But, would need to see example data to adapt it to your situation.

Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks for the reply. I took your advice and have been able to find the formula elsewhere. I also read your posts and it will definitely follow those guidlines next time on my queries.  first time user of this forum so I appreciate the guidance.

amitchandak
Super User
Super User

@arc1412 , Can you share sample data and sample output in table format?

 

You can refer my blog on the week, you can subtract this week - last week to get week wise data

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...

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors