10 Replies Latest reply: Feb 3, 2017 8:09 AM by Sunny Talwar

# comparing daily sales between years

Hi,

I am trying to put two dimensions on the line chart in order to compare daily sales for the chosen years:

1. Date(Date,'MM/DD') - custom dimension

2. Year

Unfortunately, it creates duplicated dimensions equal to the number of years I have and does not combine it (in my example i have three years horizon and it creates three 01/01 values, 02/01 values and so on)

PS: I am still able to make it when the dimension is "Day of the Year" (see the screenshot below), but is does not work for me - I need to see actual dates (DAY and MONTH) on the X-axis.

• ###### Re: comparing daily sales between years

Guys

I'm still struggling with this

I am trying to create custom dimension where, for example, February,23,2011 would show as 02/23

1. I created interim dimension MonthNumber = num(month). It works.

2. Then I am trying to create dimension Month&Date = day([date])&"/"&[monthnumber]

It won't allow this as [monthnumber] is invalid filed name. Why?

Thank you

• ###### Re: comparing daily sales between years

May be try like this for your calculated dimension

Date(SetDateYear(Date, Year(Today()), 'MM/DD')

• ###### Re: comparing daily sales between years

OR

DATE([date],'MM/DD')

• ###### Re: comparing daily sales between years

Yeah
I just figured it out myself
Date([Дата], 'MM/DD')

Didn't realize that I can just omit the YY

thank you, Guys

• ###### Re: comparing daily sales between years

it is not working actually
The appearance is correct (MM/DD), but somehow it still stores the YY in the Dimension

That's what I ended up with:

num(month(DATE),'00')&'/'&Day([DATE])

And that's how it looks like:

• ###### Re: comparing daily sales between years

Did you give this a shot?

Date(SetDateYear(Date, Year(Today()), 'MM/DD')

• ###### Re: comparing daily sales between years

returns the error (although I ammended the formula with one more closure bracket)

• ###### Re: comparing daily sales between years

My bad... where did you put the extra bracket, here?

Date(SetDateYear(Date, Year(Today())), 'MM/DD')

• ###### Re: comparing daily sales between years

no, in the end
now it works, thank you

although i can't understand why we need point (2) below:

1. it takes the DATE

2. replaces the original year with the year from the latest available date

3. then it cut's the year off

• ###### Re: comparing daily sales between years

May be this:

Date(SetDateYear(Date, Year(Max(TOTAL Date))), 'MM/DD')