Forum Discussion
YTD not aggregating
Hello members,
I am working on the financials for my company and the YTD function is not aggregating the YTD just showing the values for the month.
the formulas as below:
Values PnL = SUM('PnL Data'[Values])
As you can see my YTD is equal to my month.
If anyone can help.
thank you
Anonymous , your formula seems correct. need some data to test now.
7 Replies
- amitchandak
Super User
Anonymous , Have you marked dimDate as date Table? And the slicer is coming from Date table?
refer why TI fails : https://www.youtube.com/watch?v=OBf0rjpp5Hw
- AnonymousNot applicable
yes I have my dimDate as table and slicer is coming from Date table
- amitchandak
Super User
Anonymous , what is the formula for "FG & SPG Consumption"? I do not see that on the list.
- themistoklis
Community Champion
Anonymous
You can also try this formula:
YTD = CALCULATE(SUM('PnL Data'[Values]),DATESYTD(dimDate[Date]))
- AnonymousNot applicable
I have tried it and still same Values.
Let me show you my variable formula and just check the last line for the Values YTD.
it is working on every other line but not the last line
Actuals YTD =Var CurrentItem = SELECTEDVALUE('IS Template (2)'[Items (Normalized)])returnSWITCH(TRUE(),currentItem = "Net Sales",[Net Sales YTD],currentItem = "Total Raw Material",[Raw Material YTD],currentItem = "Total inventory variation",[Inventory Variation YTD],currentItem = "TOTAL INDIRECT MATERIAL EXPENSES",[Indirect Material Expenses YTD],currentItem = "TOTAL ADDED VALUE",[Added Value YTD],currentItem = "TOTAL plant, Salaries & Wages",[PLANT, SALARIES & WAGES YTD],currentItem = "TOTAL OF DISTRIBUTION EXPENSES",[DISTRIBUTION EXPENSES YTD] ,currentItem = "TOTAL GENERAL MFG EXPENSES",[GENERAL MFG EXPENSES YTD],currentItem = "TOTAL DEPRECIATION",[DEPRECIATION YTD],currentItem = "TOTAL GROSS PROFIT",[Gross Profit YTD],currentItem = "TOTAL SELLING EXPENSES",[SELLING EXPENSES YTD],currentItem = "TOTAL ADMIN EXPENSES",[ADMIN EXPENSES YTD],currentItem = "TOTAL OTHER REVENUES & EXPENSES",[OTHER OPERATING REVENUS & EXPENSES YTD],currentItem = "Operating Profit",[Operating Profit YTD],currentItem = "TOTAL OTHER NON OPERATING",[Other Non Operating YTD] ,currentItem = "NET PROFIT (LOSS)",[Net Profit YTD] ,currentItem = "NET PROFIT %",FORMAT([Net profit %] ,"0.0%"),currentItem = "EBITDAAL",[EBITDAAL] ,CurrentItem = "EBITDAAL %",FORMAT([EBITDAAL %] ,"0.0%"),CALCULATE([Values YTD],FILTER('PnL Data','PnL Data'[Items]=CurrentItem)))