Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Expression with several distict selections

Hi!

I am new to qlikview and trying to learn how to make extresssions.

I am trying to combine to different extression bu I do not know how:

My expressions is

if (GetSelectedCount([RäkÅr])<>1,
-
Sum({<[RäkÅr]={$(=max([RäkÅr])-1)} >} Belopp)/1000,
-
Sum({<[RäkÅr]={$(=RäkÅr-1)}>} Belopp)/1000)

and

 

=((sum({<[Rrnummer] = {4}>} Belopp))/1000)

What I am trying to do is that I want a pivottable that will give my only values from "Rrnummer=4) no matter and from a "Räkår" that is one  less than the present one.

If anyone could help me how to write this expression it would be helpful.

Thank you

Jonny

1 Solution

Accepted Solutions
MVP
MVP

Re: Expression with several distict selections

May be, like this?

if (GetSelectedCount([RäkÅr])<>1,
-
Sum({<[Rrnummer] = {4}, [RäkÅr]={$(=max([RäkÅr])-1)} >} Belopp)/1000,
-
Sum({<[Rrnummer] = {4}, [RäkÅr]={$(=RäkÅr-1)}>} Belopp)/1000)

4 Replies
bwisenosimenkg
Valued Contributor

Re: Expression with several distict selections

Hi, Johnny.

In your first expression you only need the upper expression:


Sum({<[RäkÅr]={$(=max([RäkÅr])-1)} >} Belopp)/1000


This is because when a RäkÅr is selected that is the max([RäkÅr]).

I did not read your question properly the first time.

A combined expression would be

Sum({<[RäkÅr]={$(=max([RäkÅr])-1)},[Rrnummer] = {4} >} Belopp)/1000

Regards
SKG

MVP
MVP

Re: Expression with several distict selections

May be, like this?

if (GetSelectedCount([RäkÅr])<>1,
-
Sum({<[Rrnummer] = {4}, [RäkÅr]={$(=max([RäkÅr])-1)} >} Belopp)/1000,
-
Sum({<[Rrnummer] = {4}, [RäkÅr]={$(=RäkÅr-1)}>} Belopp)/1000)

sujeetsingh
Honored Contributor III

Re: Expression with several distict selections

Johny ,

Please come up with simple words and use some day to day fields .

Not applicable

Re: Expression with several distict selections

Thank you tresesco, this works very well.

Jonny

Community Browser