Skip to Content
author's profile photo Former Member
Former Member

Comparing the Current year day to the Prior year day data in webi

Hello Everyone,

I am trying to create a report in webi which will compare the last year sales to current year sales on day.

i.e 3rd Monday in Jan2010 = 3rd Monday in Jan 2011.

I have create a variable prior year ' =RelativeDate([Calendar day];-(52*7))' Which tells me which day was monday last year.

Claendar Year Prior Year Current year Sales Prior year sales

12/1/2010 12/2/2009 3000

12/2/2010 12/3/2009 5000

12/3/2010 12/4/2009 3000

12/1/2011 12/2/2010 2000

12/2/2011 12/3/2010 4000

But i need the current year sales and the prior year sales to be on the same row.

ex: 12/1/2011 12/2/2010 2000 5000

Is there any way to do that?


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2011 at 08:55 AM


    Use this formula in Variable editor

    vDataMonth =MonthNumberOfYear([Day])

    vDataYear =Year([Day])

    StatementMonth =MonthNumberOfYear(ToDate(UserResponse("Statement Date:");""))

    vStatementYear =Year(ToDate(UserResponse("Statement Date:");""))

    Best Regards


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Naveen,

      Thanks for the reply, But i am not using any prompts in the report. At the BW side there is a filter that gives only the current year and the prior year data, As the B-user whats to see data for all the days in the current year and prior year.

      Anyway i figured it out at last!

      This formula works perfectly.

      =If(Year([Calendar day]) = Year(CurrentDate());[Calendar day];RelativeDate([Calendar day] ;(52*7)))

      Thank you for trying naveen.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.