Forum Discussion
YTD Revenue Calculation
- 9 years ago
Hi espinozan,
It seems that it's something wrong with the report. The "year" context should always be there with function "TOTALYTD". Have a look at the example in the picture. The "TotalYTD" will accumulate in one year (2007). And it will start from 0 in the next year.
You have data of two years. So the result will be wrong if there is only a month context. Please try to create a report as the picture showed.
Best Regards!
Dale
Hi espinozan,
It seems that it's something wrong with the report. The "year" context should always be there with function "TOTALYTD". Have a look at the example in the picture. The "TotalYTD" will accumulate in one year (2007). And it will start from 0 in the next year.
You have data of two years. So the result will be wrong if there is only a month context. Please try to create a report as the picture showed.
Best Regards!
Dale
- espinozan9 years agoHelper I
Thanks v-jiascu-msft,
This helps alot, thank you. But is there to do a continuing YTD? Meaning it gives me a running sum for 12 months prior to today's date.
- v-jiascu-msft9 years agoMicrosoft Employee
Hi espinozan,
Yes, YTD is continuing for 12 months. The third parameter decides the end of the 12 months. Have a look at this formula. It starts from "07-25" to "07-24" of the next year. (but we can't use today())
TotalYTD = TOTALYTD ( SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] ), 'Date'[Date], "07-24" )Best Regards!
Dale
- v-jiascu-msft9 years agoMicrosoft Employee
Hi espinozan,
Could you please tell me if your problem was resolved? Could you please share the answer or mark the proper answer as solution if it's convenient for you? That will be a help to the others.
Best Regards!
Dale