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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Week comparison

Hello All,
I have data which is updated on weekly basis for entire year . Once its updated i want to compare current week value with previous week value and display only the values which got reduced from previous week in Tabular form/(or any better method) till next week data updation.

My data shows like this 

Karthik87_0-1642309023830.png

For an example : Module 1 - Week 2 Process A to be compared with Week 1 process A and display if reduced .. same for Process 2 ...      goes on for every new week..

I tried for couple of days but couldnt get expected results. Should i do it in excel or is there a way to do it in Power Bi.
Thank you everyone..

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi~ @Anonymous 

Please create a new column.

Column = 
IF (
    'Table'[Value]
        < CALCULATE (
            SUM ( 'Table'[Value] ),
            'Table'[Week]
                = EARLIER ( 'Table'[Week] ) - 1,
            ALLEXCEPT ( 'Table', 'Table'[Module], 'Table'[Output] )
        ),
    'Table'[Value]
)

The result should be like this.

屏幕截图 2022-01-20 093811.jpg

I hope I understand correctly, if not then please let me know.

Best Regards,

Community Support Team _ Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi~ @Anonymous 

Please create a new column.

Column = 
IF (
    'Table'[Value]
        < CALCULATE (
            SUM ( 'Table'[Value] ),
            'Table'[Week]
                = EARLIER ( 'Table'[Week] ) - 1,
            ALLEXCEPT ( 'Table', 'Table'[Module], 'Table'[Output] )
        ),
    'Table'[Value]
)

The result should be like this.

屏幕截图 2022-01-20 093811.jpg

I hope I understand correctly, if not then please let me know.

Best Regards,

Community Support Team _ Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

 

Anonymous
Not applicable

@Anonymous : Thank you so much.. Very helpful

amitchandak
Super User
Super User

@Anonymous , Create a separate week or week year table.

Create a column like this in week or year week column

 

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

 

 

measures like these will help. with separate week table, it should work project wise
This Week = CALCULATE(sum('Table'[value]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[value]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

 

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.