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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jianlong
Resolver I
Resolver I

Calculate the data related to previous period

Hi, I am trying to sum up a value for the current periods and the previous periods (current-13).  

I tried this :

 

case_previous_FP = CALCULATE(SUM(SWT[CASES_COMPLETED]),FILTER(FISCAL_PERIOD,FISCAL_PERIOD[Index]-13))   
 
Any thoughts?  
btw, date/month/year does not work.  We did generate an index for all the periods..   thanks.
3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Is there no date column?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
CNENFRNL
Community Champion
Community Champion

Hi, @jianlong , you might want to try this,

case_previous_FP =
CALCULATE ( SUM ( SWT[CASES_COMPLETED] ), FISCAL_PERIOD[Index] <= 13 )

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

edhans
Super User
Super User

You can try this @jianlong 

 

case_previous_FP =
CALCULATE(
    SUM( SWT[CASES_COMPLETED] ),
    FILTER(
        ALL( FISCAL_PERIOD[Index] ),
        FISCAL_PERIOD[Index] - 13
    )
)

 

I'd need to see data though to really look at it more closely.

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors