Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

stright table ?

Datesales
1/1/2014100
12/1/2014200
2/3/2015222
12/1/2015323
4/5/2016345
12/1/2016444
12/23/2016789

Hi I have one table with above 2 columns ,

i have ploted a stright table with dimension is Date  and measure is sum(sales),  here my requirmnet isi have to create another expression

with calculation is

sum(sales)/previous year highest month sales which means

formula:

sum(sales)/previous year highest month sales

ex:

when Date is 1/1/2014 it will look for previous year highest month ,in that case it doesn't have any year values  so it is going to be blank.

like wise

if u see for  2/3/2015 values is    222

and previous year value is 200

here the calculation should be like  222/200

like this i want write a expression for dynamic calculation

1 Solution

Accepted Solutions
Highlighted
Master II
Master II

Re: stright table ?

here you go.

have a look at attached qvw.

hope this helps

View solution in original post

8 Replies
Highlighted
Creator II
Creator II

Re: stright table ?

Hi ,

Please refer this.

From this you can get solution

Peek() vs Previous() – When to Use Each

Highlighted
Not applicable

Re: stright table ?

Hi,

Thanks for looking in to this

i want do this in straight table

Highlighted
Master II
Master II

Re: stright table ?

hi,

have a look at the attached sample.

hope this helps!

Highlighted
Not applicable

Re: stright table ?

Hi Frank Hartmann,

It is very close to the result,

its giving result as per current data ,if I add more records then giving wrong result,

let say I have added one more record called   12/10/2015    330

in this case ur picking max value but I want choose the max date value(not maximum value)

pls let me know if ur not understanding myrequirement

Highlighted
Partner
Partner

Re: stright table ?

Hi Frank Hartmann,

You need to pick previous year max date value..In your case...

Highlighted
Master II
Master II

Re: stright table ?

Im not sure what you expect if you add the line

12/10/2015    330

like this?

if not, please show expected output!

Highlighted
Not applicable

Re: stright table ?

hi Frank,

when I add new record called   12/10/2015  300 (not 330)

in this ur picking max value which will  pick the date of (12/01/2015) but my intention is pick the max date value (12/10/2015)

Highlighted
Master II
Master II

Re: stright table ?

here you go.

have a look at attached qvw.

hope this helps

View solution in original post