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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
alijalil
Frequent Visitor

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

@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
alijalil
Frequent Visitor

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

alijalil
Frequent Visitor

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 @alijalil ,

 

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 @alijalil ,

 

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



@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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.