cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Data4Beer Frequent Visitor
Frequent Visitor

Rolling 60 Day Balance

I am trying to do a 60 day rolling balance. Please review my screenshot below and help me see where I am going wrong.

Nothing is populating in the highlighted column. 

 

 60 Day Balance = CALCULATE(sum('BI - Discounts Balance'[Balance]),DATEADD('BI - Discounts Balance'[TransactionDate], 60, DAY))

 

 

Capture.PNG

 

Thank you !

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Rolling 60 Day Balance

HI @Data4Beer

 

Try this MEASURE

 

Rolling balance =
CALCULATE (
    SUM ( TableName[Amount] ),
    DATESINPERIOD ( TableName[Date], SELECTEDVALUE ( TableName[Date] ), -60, DAY )
)
Try my new Power BI game Cross the River

View solution in original post

5 REPLIES 5
sdjensen Senior Member
Senior Member

Re: Rolling 60 Day Balance

You can't do this kind of calculation as a column - add the calculation as a measure instead.

/sdjensen
Microsoft v-ljerr-msft
Microsoft

Re: Rolling 60 Day Balance

Hi @Data4Beer,

 

Have you tried creating a measure instead to see if it works? If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

Data4Beer Frequent Visitor
Frequent Visitor

Re: Rolling 60 Day Balance

 

 

 

 

Hi There

 

Yes I have just tried it as a calculation. When I display the result as a table, the rolling 60 day balance just reflects the balance amount as shown in the screenshot below

 

Capture.PNG

Super User III
Super User III

Re: Rolling 60 Day Balance

HI @Data4Beer

 

Try this MEASURE

 

Rolling balance =
CALCULATE (
    SUM ( TableName[Amount] ),
    DATESINPERIOD ( TableName[Date], SELECTEDVALUE ( TableName[Date] ), -60, DAY )
)
Try my new Power BI game Cross the River

View solution in original post

Data4Beer Frequent Visitor
Frequent Visitor

Re: Rolling 60 Day Balance

Thank you, this has worked!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors