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

HI @Data4Beer

 

Try this MEASURE

 

Rolling balance =
CALCULATE (
    SUM ( TableName[Amount] ),
    DATESINPERIOD ( TableName[Date], SELECTEDVALUE ( TableName[Date] ), -60, DAY )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
v-ljerr-msft
Employee
Employee

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

 

 

 

 

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

HI @Data4Beer

 

Try this MEASURE

 

Rolling balance =
CALCULATE (
    SUM ( TableName[Amount] ),
    DATESINPERIOD ( TableName[Date], SELECTEDVALUE ( TableName[Date] ), -60, DAY )
)

Regards
Zubair

Please try my custom visuals

Thank you, this has worked!

sdjensen
Solution Sage
Solution Sage

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

/sdjensen

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.