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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Looking for the sum of the Jan-Aug of 2020

I am looking for the sum of the Jan-Aug of last years HDD but I cannot get my formula to work.
 
2020 = CALCULATE(SUM(HDD[HDD]), HDD[Year]=2020, FILTER(Calendars, CALENDAR(DATE(2020,1,1), Calendars[Today's Month])))
1 REPLY 1
Samarth_18
Community Champion
Community Champion

Hi @Anonymous 

 

Its always bit difficult to give precised answer without sample data and expected output. It would helpful if you could share the same.

In the meantime can you try below code:-

2020 =
VAR current_selected_date =
    MAX ( HDD[<Date column of your HDD table>] )
RETURN
    CALCULATE (
        SUM ( HDD[HDD] ),
        YEAR ( HDD[<Date column of your HDD table>] )
            = ( YEAR ( TODAY () ) - 1 ),
        MONTH ( HDD[<Date column of your HDD table>] ) <= MONTH ( TODAY () )
    )

 Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.