Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vipin_mishra479
Creator II
Creator II

Expression Problem

Hi all ,

Hope you all well,

Actually what i have facing one problem which i post here please reply ASAP.

My requirement is

I have weekday and date field and i want to show just example today is Wednesday and date is 25-6-2014 there is some value

and i want to show Wednesday of last year   26-06-2013 value i am confuse how i calculate . i have do something my application

here i get the date in dimension this year and last year of same day.

but i not able to find last year same day data.

I attached the qvw file please help

7 Replies
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi, maybe you can use addyears function to get the same date but for past year, like this:

= WeekDay(addyears(Today(),-1)) & ' ' & Date(addyears(Today(),-1))


so taking the example with today's date you'll get this after evaluating the expression:

Today is Wed 6/25/2014

and the same date but for past year:

Tue 6/25/2013

vipin_mishra479
Creator II
Creator II
Author

Hi Jaime,

Thanks for the reply,

i get the date in dimension but i could not find the value in expression for last year week day

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Maybe like this, check the attached example please

vipin_mishra479
Creator II
Creator II
Author

hi jaime,

no is not working

in chart how u get both date value.

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

what chart you want to use?

vipin_mishra479
Creator II
Creator II
Author

previously i attached the qvw file here i use on pivot table and in this table i create a date of current year and last year

and i create two expression . here i want in my first expression want first date value and second expression second date value....

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Like this:

I changed the pivot table, so you can see week day for CY and PY as well as exact date,