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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

TOTALYTD formula not working

Hi,

I am using the following formula to calculate YTD totals but I keep getting the total year number instead of YTD:

YTD_Tx.Sales= TOTALYTD([CM_Tx.Sales],DateTable[Date])
where CM_Tx.Sales = calculate(sum(TS(Sales), FILTER(TS,TS[Cycle]= "CM" && TMS[Business]= "Tx"))
 
Can someone please help me figure out what I am doing wrong? I have tried several variations but nothing is working 😞
Thanks in advance
3 REPLIES 3
Pragati11
Super User
Super User

Hi @Anonymous ,

 

Just looking at your TOTALYTD dax expression, I think it is expecting a 3rd argument.

You can also achieve this without using TOTALYTD.

Can you try modifying your DAX as follows:

YTD_Tx.Sales = CALCULATE(

                                             SUM(TS(Sales), DATESYTD('DateTable'[Date]), TS[Cycle]= "CM", TMS[Business]= "Tx"

                                            )

 

Try referring the folllowing article on why TOTALYTD can have issues:

https://www.sqlbi.com/blog/marco/2018/08/10/the-hidden-secrets-of-totalytd/

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Thank you for your response. I tried the formula but it is still giving the total sales and not YTD sales. I tried the formulas in the link as well but getting same result with them too. I checked the relationship between the two table and it also exists. So i really can't figure out what the issue is 😞

HI @Anonymous ,

 

Is your date table correct? I mean does it have date values up-to-date?

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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