Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
leomathew
Contributor

Hi, please help with the set analysis expression?

I need to write an ecpression so that the previous Qtr is also visible with the selected.

PFA for more details.

 

Year

Qarter

Period

PRODUCT

COUNT

2015

Q4

Q4 2015

D

30

2016

Q1

Q1 2016

A

20

2016

Q1

Q1 2016

B

15

2016

Q1

Q1 2016

C

12

2016

Q1

Q1 2016

D

19

2016

Q2

Q2 2016

A

18

2016

Q3

Q2 2016

B

16

2016

Q4

Q2 2016

C

0

2016

Q1

Q2 2016

D

13

 

Thanks in advance.

 

4 Replies
MVP
MVP

Re: Hi, please help with the set analysis expression?

Maybe use something like

=sum({$+1<Prod = {'D'},PeriodNum={$(=Max(PeriodNum)-1)}>}Count)

[having PeriodNum created in the script to get an easier access to the previous period.]

leomathew
Contributor

Re: Hi, please help with the set analysis expression?

Hi,

Thanks for your reply, its very close to what I need.

do you think we can do something to hide the highlighted white space, in this solution.

MVP
MVP

Re: Hi, please help with the set analysis expression?

I think that's the default Qlik behaviour for two dimensions in group style mode.

One option would be to use a single dimension (e.g. by concatenating your current two into a single one)

Highlighted
leomathew
Contributor

Re: Hi, please help with the set analysis expression?

Hi,

What if another column Div is added to the table.

How to include that in

sum({$+1<Prod = {'D'},PeriodNum={$(=Max(PeriodNum)-1)}>}Count

Please suggest