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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.