Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello qlikview world
i wanna ask a problem that i can't solve
i have 3 column : premary key, time, price
and i want to show the first and last data each second
it will show something like below :
time | premary key | first | last |
---|---|---|---|
14:56:20 | 195 | 142 | - |
14:56:20 | 200 | - | 142 |
14:56:34 | 186 | 142 | - |
14:56:34 | 194 | - | 142 |
... | |||
... | |||
... | |||
15:04:07 | 165 | 144 | - |
15:04:07 | 167 | - | 144 |
how to do that?
many thx....
Hi,
Sorry i forget to add Group by clause in it because first value and last value function will work only with group by.
source_filter:
Load
Time,
FirstValue(Premary_Key) as FirstPremaryKey,
LastValue(Premary_Key) as LastPremaryKey,
FirstValue(Price) as firstprice,
LastValue(Price) as lastprice
Resident source Group by Time;
It will work.
Celambarasan
Hi,
Are you expecting this in load script or in presentation?
Celambarasan
halo celambarasan..
i want to show this in presentation of qlikview
Hi,
If you are need this in load try this.
Table:
Load
time,
premary key,
price
From ..
OutPut:
Load
time,
FirstValue(premary key) as FirstPremaryKey,
LastValue(premary key) as LastPremaryKey,
FirstValue(price) as first,
LastValue(price) as last
Resident
Table;
Hope it helps
Celambarasan
Hi,
Can you upload the sample data to work with it?
Celambarasan
hi...
i've tried yours but it shows error :
Invalid expression
source_filter:
Load
Time,
FirstValue(Premary_Key) as FirstPremaryKey,
LastValue(Premary_Key) as LastPremaryKey,
FirstValue(Price) as firstprice,
LastValue(Price) as lastprice
Resident source
many many thx
Hi,
You have missed your group by clause.
source_filter:
Load
Time,
FirstValue(Premary_Key) as FirstPremaryKey,
LastValue(Premary_Key) as LastPremaryKey,
FirstValue(Price) as firstprice,
LastValue(Price) as lastprice
Resident source
Group by Time;
-Sridhar
Hi,
Sorry i forget to add Group by clause in it because first value and last value function will work only with group by.
source_filter:
Load
Time,
FirstValue(Premary_Key) as FirstPremaryKey,
LastValue(Premary_Key) as LastPremaryKey,
FirstValue(Price) as firstprice,
LastValue(Price) as lastprice
Resident source Group by Time;
It will work.
Celambarasan
many thx for both of you..
many many thx...
may god with you