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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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