Skip to Content
0

2 year comparison in Webi

Jan 23 at 01:29 PM

37

avatar image
Former Member

Hi, I have a problem. I want to compare data of 2 years. The scenario is I have a filter defined at universe level "Date Range" all i want is that user select date like 01/01/2016 and 31/12/2017 and it pick the year from this date and compare the data side by side with city name and month in the section.
The issue so far is 01.png that if there is no data in 2017 so it assumes 2016 as max and min year. As I used Min([Date]) and Max([Date]) for picking the year.

I want the result like 02.png. as there is date in both 2016 and 2017.

Any help will be highly appreciated. Thanks

01.png (13.4 kB)
02.png (14.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
AMIT KUMAR
Jan 23 at 01:37 PM
0

you can achieve this with cross tab.instead of using min/max to get year you can create one variable with year () funciton to extract years.

V year=Year[Date object]

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks AMIT KUMAR. But I want to get the year from predefined date range filter defined at universe level.

0

it's same what you are looking.let say you have date object in the report and same range filter on this object.if you pass

01/01/2016 and 31/12/2017 date range then in the date object you will get the all dates.If you will create V year variable on date object then you will get two values in this.2016,2017.

1
Former Member

Thank you so much Amit Bro it solves the issue. Actually I was not using the Date object plus I was using vertical table. Thanks again. God Bless you.

1