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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
geerduran
Frequent Visitor

TOTALYTD over many years

I´m using

TOTALYTD(
        SUM('Datos Comparativo'[Baseline]),
        'Datos Comparativo'[Periodo].[Date]
    )
...and I get
Year Month  Baseline   TOTALYTD
2019  11        100           100
2019  12        100           200
2020  01        100           100
2020  02        100           200
 
I want this (summing over many years)
Year Month  Baseline   TOTALYTD
2019  11        100           100
2019  12        100           200
2020  01        100           300
2020  02        100           400
 
How can I use 4th parameter of TOTALYTD?
1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @geerduran 

TOTALYTD will sum only over one year, up to the date tha fourth parameter specifies

Try this

 

CALCULATE (
    SUM ( 'Datos Comparativo'[Baseline] ),
    FILTER (
        ALL ( 'Datos Comparativo'[Date] ),
        'Datos Comparativo'[Date] <= MAX ( 'Datos Comparativo'[Date] )
    )
)

Please mark the question solved when done and consider giving kudos if posts are helpful.

 

Cheers  Datanaut

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @geerduran 

TOTALYTD will sum only over one year, up to the date tha fourth parameter specifies

Try this

 

CALCULATE (
    SUM ( 'Datos Comparativo'[Baseline] ),
    FILTER (
        ALL ( 'Datos Comparativo'[Date] ),
        'Datos Comparativo'[Date] <= MAX ( 'Datos Comparativo'[Date] )
    )
)

Please mark the question solved when done and consider giving kudos if posts are helpful.

 

Cheers  Datanaut

 

geerduran
Frequent Visitor

Done!!! Thank you very much.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors