cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ryan_b_fiting
Helper V
Helper V

Calculation Item - Rolling 7 Day Total

Hello Community - 

I am having an issue creating a Calculation Item in the Tabular Editor for a Rolling 7 Day Total.  When I put my DAX measure below in tabular editor I get an error: "Expression - The end of the input was reached"

 

Below is my measure (very simple) that I am using, and I am not sure where this is going wrong?  Any insight to this would be GREATLY appreciated.

CALCULATE( 
    SELECTEDMEASURE(),                                 
    DATESINPERIOD(Date_Table[Date],            
        LASTDATE(Date_Table[Date]),-7,DAY )

 

Thank you!

Ryan F

1 ACCEPTED SOLUTION
SergioSilvaPT
Super User
Super User

Hi @ryan_b_fiting ,

 

You're missing a parenthesis in the end?

 

 

CALCULATE( 
    SELECTEDMEASURE(),                               
    DATESINPERIOD(Date_Table[Date],           
        LASTDATE(Date_Table[Date],-7,DAY )
        )

 

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
SergioSilvaPT
Super User
Super User

Hi @ryan_b_fiting ,

 

You're missing a parenthesis in the end?

 

 

CALCULATE( 
    SELECTEDMEASURE(),                               
    DATESINPERIOD(Date_Table[Date],           
        LASTDATE(Date_Table[Date],-7,DAY )
        )

 

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@SergioSilvaPT wow, I guess I should have focused a little better!  Thanks for the extra eyes on my measure!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Top Solution Authors