Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

last year table

Hi,

I need to create a Last Year table and that's what I do:

original table:

Timestamp,

addyears (Timestamp,-1) as Timpestamp_ly,

net_price,

status;

LY_table:

Timestamp as Timpestamp_ly,

net_price as net_price_ly,

status;

The problem of this structure is that LY_table uses the status field of the current timestamp, I mean that if the status of the actual timestamp doesn'tmatch with the status of the last year timestamp the LY_table doesn't work.

The only way it works is if I name the status field as status_ly in the LY_table but I need to keep the old name to compare both net_prices in a graph

I don't know if it's clear...

Any Idea??

Regards, David

4 Replies
Highlighted
Not applicable

last year table

I would use a date function while look to use Year from Timestamp

like Time stamp gives u complete date and time for particular field

Date(Timestamp, 'MM/DD/YY') gives you just date from same time stamp

Highlighted
Not applicable

last year table

Sorry, I don't understand...

Highlighted
Not applicable

last year table

First of all r u talking abt tables in QV or on DB side?

Highlighted
Not applicable

last year table

QV tables,

Do you mean trunking by day to get more range of Status?

Thanks,

David