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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX function

Hey all, Im trying to create a Running Total (RT) function for Actuals, Budget and Forecast data. I have included the following function: 

Actual RT = calculate(sum(Actuals[Actual]), Filter(ALLSELECTED('calendar'[Date]), ISONORAFTER('calendar'[Date], MAX(Actuals[Date], desc))))   ---) I received the following error as a result
alijalil_0-1671099717752.png

Any suggestions to why this maybe the case? TIA!

@amitchandak @MFelix @Mikelytics @Greg_Deckler @JihwanKim 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@MFelix this worked for me:

 

Actual RT = Calculate(SUM(Actuals[Actual]),FILTER(ALLSELECTED('Calendar'[Date]), ISONORAFTER('Calendar'[Date],MAX(Actuals[Date]), DESC)))

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@MFelix thats correct I couldnt recover the file since it it was broken.

Anonymous
Not applicable

Thanks @MFelix  @JW_van_Holst for your responses. Ive had a slightly different issue. My pc required a restart to install updates and I didnt save the file. To recover the file, I reopened the file from Autorecovery in PowerBI and when I did Im stuck with this page. Any idea how this can be recovered to its previous state?

 

alijalil_0-1671113546312.png

 

 

Hi @Anonymous ,

 

If the recovery file is also "broken" you don't have any way to get the recovered file. Try tomcheck the folder where the file is saved.

 

The folder is on the options of the PBI. but be aware that this are temp files and since you open it it may be already deleted.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @Anonymous ,

 

Believe you have the syntax of the ISONORAFTER incorrect try the folllwing:

 

Actual RT =
CALCULATE (
    SUM ( Actuals[Actual] ),
    FILTER (
        ALLSELECTED ( 'calendar'[Date] ),
        ISONORAFTER ( MAX ( 'calendar'[Date] ), desc )
    )
)

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix this worked for me:

 

Actual RT = Calculate(SUM(Actuals[Actual]),FILTER(ALLSELECTED('Calendar'[Date]), ISONORAFTER('Calendar'[Date],MAX(Actuals[Date]), DESC)))
JW_van_Holst
Resolver IV
Resolver IV

ISONORAFTER is a utility function. Do not use it in measures. 
Try:

RT =
VAR LastVisibleDate =
    MAX ( 'calendar'[Date] )
VAR PeriodToUse =
    FILTER ( ALL ( 'calendar'[Date] ), 'calendar'[Date] <= LastVisibleDate )
RETURN
    CALCULATE ( SUM ( Actuals[Actual] ), PeriodToUse )

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.