Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

two conditions in dimensions

Hi Qlikview Gurus,

Please help its urgent.

I have the following Requirement where the data is

CUSTNUM   SEQ  VALUE       NAME

1                     2        PRCT         A

1                     1        CTR           e

1                     3        CTOR         d

1                     4        PRCT         B

I need to check two conditions

1)  Value=PRCT 2) Max(SEQ) and then display the Custname for this CUSTNUM

Eg:-Here in this example if i select custnum then Name should display B,Because if we apply the

if(Value='PRCT',Name) then we will have only 2 rows but how do I take the max of SEQ and display B.

Please help its urgent.

1 Solution

Accepted Solutions
sunny_talwar

There are two options

1) Create a straight table

Dimension

CUSTNUM

Expression

FirstSortedValue({<VALUE = {'PRCT'}>} NAME, -SEQ)

2) Concat them in a text box object

Concat(DISTINCT Aggr(FirstSortedValue({<VALUE = {'PRCT'}>} NAME, -SEQ), CUSTNUM))

View solution in original post

8 Replies
sunny_talwar

May be like this:

FirstSortedValue({<VALUE = {'PRCT'}>} NAME, -SEQ)

sunny_talwar

Check out the attachment

Capture.PNG

Anonymous
Not applicable
Author

Sunny I cant open as I have personal edition.

Can you please write the code here or its the same which you have written ?

Will this code work if we have more than 1 CUSTNUM as we need to group it by CUSTNUM also then...

Please correct me if I am wrong.

Not applicable
Author

hi sunny. wh verson qlikview , r u using? ur qvw not opening in my qlikview. I am using qlikview 12 ,64 bit trial version.

any solution for it.

sunny_talwar

I am using QV12 SR5 I think

sunny_talwar

There are two options

1) Create a straight table

Dimension

CUSTNUM

Expression

FirstSortedValue({<VALUE = {'PRCT'}>} NAME, -SEQ)

2) Concat them in a text box object

Concat(DISTINCT Aggr(FirstSortedValue({<VALUE = {'PRCT'}>} NAME, -SEQ), CUSTNUM))

Digvijay_Singh

Without license you cannot open others qvw files.

Anonymous
Not applicable
Author

Thank you Sunny very much for your help.

Really appreciate the quick solution.