cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ryan_b_fiting
Post Patron
Post Patron

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
Resolver V
Resolver V

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.
Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

View solution in original post

2 REPLIES 2
SergioSilvaPT
Resolver V
Resolver V

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.
Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors