Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
trdandamudi
Master II
Master II

Show all the records in a chart where a field value is different in prior month

Hi,

I have the following data:

Load * Inline [

ID,Desc,Pcode,Month

10,A,500,Jan

20,B,600,Jan

30,C,700,Jan

10,A,500,Feb

20,B,601,Feb

30,C,702,Feb

];

I want the output as below in a chart:

ID   Desc  Pcode  Month

20   B       601       Feb

30   C       701       Feb

Logic: Show all the rows if the Pcode of Jan of an ID is not equal to Pcode of Feb for the same ID. In my output I am not getting the ID 10, because the Pcode is the same in both Jan and Feb. I do not have access to the script, so I need the solution in the front end using Set Analysis etc.,

Thanks for your time...

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Aggr(If(Pcode <> Above(Pcode) and ID = Above(ID), Pcode), ID, Month)

View solution in original post

4 Replies
trdandamudi
Master II
Master II
Author

The output should be as below and sorry for the typo:

ID   Desc  Pcode  Month

20   B       601       Feb

30   C       702       Feb

Thanks

sunny_talwar

May be this

=Aggr(If(Pcode <> Above(Pcode) and ID = Above(ID), Pcode), ID, Month)

View solution in original post

trdandamudi
Master II
Master II
Author

Sunny,

Thank you and a quick question. I have almost 30 dimensions, is there any better way or I should use only Aggr() function ?

Thanks

sunny_talwar

I am not sure how those dimensions are and what you need the final output as... but more likely then not you will need an Aggr() function... although if the sorting is correct... you might be able to use just this

If(Pcode <> Above(Pcode) and ID = Above(ID), Pcode)