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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
joshua1990
Post Prodigy
Post Prodigy

Calculate Changes from previous cycle

Hi all!

I have a table that contains weekly extracts / snapshots of transactional data:

Year-Week Snapshot Article Date Value
2023-01 A 01.01.2023 60
2023-02 B 15.02.2023 50

This table is linked to a simple calendar table.

Then this data is visualized in a simple bar chart with an aggregation on a monthly level.

Now I would like to check the changes vs the previous snapshot.

How would you do that?

1 REPLY 1
amitchandak
Super User
Super User

@joshua1990 , Create a table with only Week snapshot or have that in date table

 

Create a Rank on the snapshot in the new table or date table


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

 

Then you can compare

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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