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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
YBZ
Helper III
Helper III

Summing up YTD numbers

Hi all,

 

I have a date filter in my report with an overview of all months. 

YBZ_1-1633091909394.png

Now I would like to create a measure that gives me the year-to-date sum of a column when I click on for example April.

I have tried it with TOTALYTD()

YBZ_2-1633092090017.png

expression : sum of my column

dates : column date

 

It however doesn't make sense and obviously the outcome of the measure is incorrect. 

 

Anyone knows how to do it or can point me in the right direction?

 

Regards

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@YBZ , if you using month year slicer from the date table. It should work

 

YTD Sales = Totalytd(SUM(Sales[Sales Amount]),'Date'[Date],"12/31")

 

or

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

 

 

Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw

View solution in original post

2 REPLIES 2
YBZ
Helper III
Helper III

thanks, that works! I had initially a wrong date format 🙂 

amitchandak
Super User
Super User

@YBZ , if you using month year slicer from the date table. It should work

 

YTD Sales = Totalytd(SUM(Sales[Sales Amount]),'Date'[Date],"12/31")

 

or

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

 

 

Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.