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
ajmonster
Helper II
Helper II

TOTALYTD summing all years

Hello

 

I have spend data going all the way back to 2016. Here is my formula:

Spend YTD = TOTALYTD(
                                        SUM(
                                                 Table[Gross Dollars]),
                                        Table[Date]
                                        )

 

Am I wrong in assuming that the TOTALYTD function should only return totals for the current year (Jan and Feb of 2018 at time of this post)? When I extend the TOTALYTD value over a field I get some identities that are only attributed to past data.

 

Thanks,

ajmonster

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

Hi @ajmonster,

 

If you don't specify any filter in the formula, the expression will return totals for all the year of Table[Date], not only the current year. Something like:

 

 1.PNG

And I'm not quite understand your requirement. What did you mean about this "When I extend the TOTALYTD value over a field I get some identities that are only attributed to past data" ?

 

Could you please elaborate your requirement by sharing us more detailed information like your source table structure and some sample data if possible? Also, please attach your desired result based on your sample data too. It'll give us the right direction.

 

Thanks,
Xi Jin.

View solution in original post

2 REPLIES 2
v-xjiin-msft
Solution Sage
Solution Sage

Hi @ajmonster,

 

If you don't specify any filter in the formula, the expression will return totals for all the year of Table[Date], not only the current year. Something like:

 

 1.PNG

And I'm not quite understand your requirement. What did you mean about this "When I extend the TOTALYTD value over a field I get some identities that are only attributed to past data" ?

 

Could you please elaborate your requirement by sharing us more detailed information like your source table structure and some sample data if possible? Also, please attach your desired result based on your sample data too. It'll give us the right direction.

 

Thanks,
Xi Jin.

@v-xjiin-msft

 

Your example illustrated what I meant by "extending the value (TOTALYTD) over a field (date.year). I just needed to apply a filter to get a total just for the current year.

 

Thank you,

ajmonster

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.