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
Robin96
Helper II
Helper II

Move values 1 week ahead

Hey guys, i have some trouble moving my original values 1 week ahead. Anyone have an easy DAX calculation for this?

This is my desired outcome:

Robin96_0-1712318598484.png

 

I have tried this measure, but its not giving me the right values, its working for the first column, but not the rest. i think its becasuse i have week number = previous week. Any suggestions to have this measure automated for all the columns and not just one?

VAR Current_week = SELECTEDVALUE('Dimension Date'[Week Number])

VAR Previous_week = Current_week - 1

Return
CALCULATE([Totals Lines | Cash balance],
FILTER( ALL('Dimension Date'),
'Dimension Date'[Week Number] = Previous_week)


 i have a date table with weeks in it.

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=CALCULATE([Totals Lines | Cash balance],datesbetween('Dimension Date'[date],min('Dimension Date'[date])-7,min('Dimension Date'[date])-1))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Robin96 ,

Try this, create the masure below

Measure = CALCULATE(MAX('Table'[Value]),FILTER(ALL('Table'),'Table'[Week]= MIN('Table'[Week])-1))

vrongtiepmsft_0-1712541612918.png

 

Shifted Cash Balance = 
VAR Current_week = max('Dimension Date'[Week Number])
VAR Previous_week = Current_week - 1
RETURN
CALCULATE(
    [Totals Lines | Cash balance],
    FILTER(
        ALL('Dimension Date'),
        'Dimension Date'[Week Number] = Previous_week
    )
)

Here is a similar solution for your reference, Solved: Previous period measure (no date) - Microsoft Fabric Community

 

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

Hey and thanks for the response,

This did not work.. the values i am trying to shift comes from another measure and not a table, so the max function does not work..

lbendlin
Super User
Super User

Use your dates, rather than weeks.  

 

[Date]-7

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 Kudoed Authors