• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

YTD formulas

Tom22

Member
Hi


I am looking for a formula which gives me YEAR till date sum of numbers according to the given cretaria like in attached file I want YTD sum for Austria and for dept Fin

My YTD number should also change as when I change month in cell A2.


File attached for reference.


Many thanks In advance
 

Attachments

  • Test.xlsx
    11.2 KB · Views: 12
The first solution should work now. The second relies on a new Office 365 feature and should start to work some time over the next few months.
Both solutions rely upon selecting the data that corresponds to the year to date
= INDEX(Data, ,1) : INDEX(Data, , MATCH(Month,Data[#Headers],0))
using the range composition operator ':'

The manner in which the data from the wrong country or department is filtered out is different. The first simply multiplies unwanted values by zero
= YearToDate*(Attribute[Country]=Country)*(Attribute[Dept]=Dept)
whereas the second filters the rows using these criteria prior to summation
= SUM(filteredData)
 

Attachments

  • MultipleYear2Date.xlsx
    15.6 KB · Views: 6
Back
Top