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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
BeginnerAnalyst
Frequent Visitor

Total year to date not working

Hello everyone)

I have pbi report with sales bonus calculation.

All data is in the table called "Revenue".

I need to create a measure that will sum values total to date for every manager from 

"Quarter payment" column / measure.
 
My current measure for YTD values is:
YTD payment = TOTALYTD([Quarter payment], 'Calendar'[Date])
 
But it is not working:
BeginnerAnalyst_0-1682354210278.png

 

The expected result for selected manager should be:

Q1 2023 - 2 693.93

Q2 2023 - 8 887.13

Q3 2023 - 16 320.03

Q4 2023 - 25 240.33

 

Can somebody help me in creating correct measure "YTD payment"?

Thanks in advance.

 

Here is pbix file: https://drive.google.com/file/d/18mC4bQjEwjldfHZ2XxxlXeQVxu3au5Za/view?usp=sharing

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@BeginnerAnalyst See if this helps: Better Year to Date Total - Microsoft Power BI Community

 

And this video that presents better alternatives for YTD, QTD, MTD and WTD:

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thx, but this is not working solution for my case(

@BeginnerAnalyst Here's the start of it, you'll have to add in the rest of your logic.

Measure = 
    VAR __MaxDate = MAX('Calendar'[Date])
    VAR __Manager = MAX('Revenue'[Manager Name])
    VAR __YearQuarter = YEAR(__MaxDate) * 100 + QUARTER(__MaxDate)
    VAR __PrevYearQuarter = IF(QUARTER(__MaxDate) = 1, ( YEAR(__MaxDate) - 1 ) * 100 + 4, YEAR(__MaxDate) * 100 + QUARTER(__MaxDate) - 1)
    VAR __Table = 
        SUMMARIZE(
            FILTER(ALLSELECTED('Revenue'), [Type] = "Actual"),
            [date],
            "__YQ", YEAR([date]) * 100 + QUARTER([date]),
            "__Payment", SUM('Revenue'[amount usd])
        ) 
    VAR __Quarter = SUMX(FILTER(__Table, [__YQ] = __YearQuarter), [__Payment])
    VAR __PQ = SUMX(FILTER(__Table, [__YQ] = __PrevYearQuarter), [__Payment])
    VAR __Result = DIVIDE( __Quarter - __PQ, __PQ)
RETURN
    __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thank you for reply) but the idea is not to sum Revenue'[amount usd]. I need to sum quarter payments cumulative to date for each year.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.