Forum Discussion

Paddhof1984's avatar
Paddhof1984
Helper III
9 years ago

YTD

Hello,

 

I am curious whether there is anyone who can help me out with following situation:

 

I do have 3 tables, each of them contains the total turnover from a specific year:

 

2015 (whole year)

2016 (whole year)

2017 (turnover ytd).

 

What I need or should I better say want to be shown on the chart table:

 

I need the current turnover from 2017 (ytd turnover) shown and compared to the turnover from past years (2015 and 2016) for the same timeperiod as the current year.

 

This means: f. e. today is 06/28/2017. So What I want to see is:

 

turnover 2017 from 01/17 - 06/17 (January - June)

turnover 2016 from 01/17 - 06/17 (January - June)

turnover 2015 from 01/17 - 06/17 (January - June)

 

I already tried to compare these 3 figures with first creating a total sum measure for each single year, but then I get stuck in how to proceed with creating further measures to get shown the ytd-turnover for each year. Any suggestions?

10 Replies

  • Daniil's avatar
    Daniil
    Kudo Kingpin

    Any chance you could supply some sample data so that it is easier for us to help you?

    • Paddhof1984's avatar
      Paddhof1984
      Helper III

      Daniil

       

      What I can provide you with the overview of the tables and their relationsships. Or which type of sample data do you exactly need?

       

      I have the tables:

       

      RE2015 (turnover for 2015)

      RE2016 (turnover for 2016)

      RE2017act (turnover for 2017 for the current year).

       

       

      For 2015 and 2016 (always the past years) the same turnover periods should be shown as far as the turnover period is actually shown for the current year.

       

       

      • Daniil's avatar
        Daniil
        Kudo Kingpin

        Thanks Paddhof1984. I would try something like this:

        2015 YTD =
        CALCULATE (
            SUM ( RE2015[QTY] ),
            INTERSECT ( VALUES ( RE2015[Month] ), VALUES ( RE2017act[Month] ) )
        )

        Does this help?