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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vicsinc
Frequent Visitor

Show YOY Cumulative values on line chart

I have a line chart that shows cumulative number of leads received vs target leads. Nothing fancy.

vicsinc_0-1720013756536.png

I wish to add a third line to show the Previous Year cumulative leads received.

 

The cumulative measure is calculated as follows:

 

CumLeadsActual = CALCULATE(SUM('Leads'[Leads Actual]),FILTER(ALLSELECTED('Leads'),'Leads'[Month]<=MAX('Leads'[Month])&&'Leads'[IsCurrentMonth]="Past Month"))

 
When I try to use Same Period Last Year, it's not working as expected as it's showing me monthly figures instead of cumulative
LYCumLeads = CALCULATE([CumLeadsActual], SAMEPERIODLASTYEAR('Leads'[Month]))
 
Please could somebody help?
 
Thank you
 
Vic
 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vicsinc ,

 

You can try below formula to create measures:

LYCumLeads = 
VAR CurrentMonth = MAX('Leads'[Month])
RETURN
CALCULATE(
    [CumLeadsActual],
    FILTER(
        ALLSELECTED('Leads'),
        'Leads'[Month] <= EOMONTH(CurrentMonth, -12)
    )
)
CumLeadsActual = 
CALCULATE(
    SUM('Leads'[Leads Actual]),
    FILTER(
        ALLSELECTED('Leads'),
        'Leads'[Month] <= MAX('Leads'[Month]) && 'Leads'[IsCurrentMonth] = "Past Month"
    )
)

 

vkongfanfmsft_0-1720058500072.png

Best Regards,
Adamk Kong

 

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @vicsinc ,

 

You can try below formula to create measures:

LYCumLeads = 
VAR CurrentMonth = MAX('Leads'[Month])
RETURN
CALCULATE(
    [CumLeadsActual],
    FILTER(
        ALLSELECTED('Leads'),
        'Leads'[Month] <= EOMONTH(CurrentMonth, -12)
    )
)
CumLeadsActual = 
CALCULATE(
    SUM('Leads'[Leads Actual]),
    FILTER(
        ALLSELECTED('Leads'),
        'Leads'[Month] <= MAX('Leads'[Month]) && 'Leads'[IsCurrentMonth] = "Past Month"
    )
)

 

vkongfanfmsft_0-1720058500072.png

Best Regards,
Adamk Kong

 

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

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.