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

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

Reply
Dominic91
New Member

YTD and running Totals

YTD Sum RT =
CALCULATE(
    SUM('TotalSale+LIS'[Liters]),
    FILTER(
        ALLSELECTED('TotalSale+LIS'),
        'TotalSale+LIS'[Date] <= MAX('TotalSale+LIS'[Date])
            && YEAR('TotalSale+LIS'[Date]) = YEAR(MAX('TotalSale+LIS'[Date]))
    )
)
i wrote the dax above in hopes that i would get a running total on my line graph and it worked, but now i would like to show on the same line graph, a line for each year rather than all years as one line. i am struggling to figure out how i can apply, for example, only 2019 dates into this dax. what i have tried so far isnt working, and chat gpt also cant figure this out it seems. any help would be greatly appreciated. 
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

you need a year dimension in the visual legend.

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

you need a year dimension in the visual legend.

Great, that worked. thanks for the help!!

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.