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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

YTD calculation

 
How do I calculate the revenue YTD?
 
I used:
 YTD 2019 = calculate(sum('invoices'[Amount]);DATESYTD('invoices'[Posting_Date]))
 
But it does not work. I also want to use SamePeriodeLastYear for 2018.
 
posting dates en invoices are starting in 01/01/2018 until now.
1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

@Anonymous  you need to have a date table for date functions, have you got a separate date table?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
vanessafvg
Super User
Super User

@Anonymous  you need to have a date table for date functions, have you got a separate date table?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

it still does not work. My date table is named date.

were do I need to put the link between both tables?

@Anonymous  have you set up a relationship?

 

maybe this can help?  https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

I did set up a relationship between DATE and TABLE powerBi.jpg

 both formulas do not work. I should be something simple but I can not find it...

@Anonymous  when you say it does not work can you please give more information?  what are you getting? what are the data types of both of the dates you are linking on?  is there any chance you can share you file?

 

if not please share some extracts from your data so i can recreate the issue, you need to copy and paste the data not put images.

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

it just maks the sum of the whole year and not a year to date total.

I started over with only two table. Same result. I'll share it in a privat post.. no secrets in it 🙂

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.