Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

sumitjadhav
Contributor II

iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

Hello,

i want to check whether the id present in 2014 also exists in 2015 if id is present then i want to create new field composed of this id or else other,how to do this  and it must be dynamic?

Thank you in Advance.

                                                                                                                                                                with Regards,

                                                                                                                                                                 Sumit Jadhav.

1 Solution

Accepted Solutions
MVP
MVP

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

In script?

LOAD id,

  If(Count(Year) = 2, id) As Both,

  If(Count(Year) < 2, id) As OneOnly,

Resident Data

Where Match(Year, 2014, 2015)

Group By id;

9 Replies
MVP
MVP

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

Would you be able to share a sample with your expected output to help you better?

sumitjadhav
Contributor II

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

id     year          sales

c1  2015          50

c1  2014          60

c2   2015         100

c4   2014          50

then it should return , if id(c1)  is present in both the years then it should come under one field else it should come in another field as of id (c2).

MVP
MVP

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

Are you trying to do this in the script or front end?

sumitjadhav
Contributor II

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

Any how i Want to do it whether in frontend or in backend ,but it must be dynamic.

MVP
MVP

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

In script?

LOAD id,

  If(Count(Year) = 2, id) As Both,

  If(Count(Year) < 2, id) As OneOnly,

Resident Data

Where Match(Year, 2014, 2015)

Group By id;

MVP
MVP

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

>>but it must be dynamic

In what way?

sumitjadhav
Contributor II

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

Hello,

         How to implemment a same logic Month and day-wise?

         Thank you In Advance.

                                                                                              With Regards,

                                                                                             Sumit Jadhav.

MVP
MVP

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

I don't understand how that would work. You are counting instances of a an ID over two years, how would you like to do that month wise or day wise? Do you mean compare two months or two days? Which months or days? You might need a front end solution for that - but I would post a new question rather than continue the discussion here.

sumitjadhav
Contributor II

Re: iwant to check whether the id present in 2014 also exists in 2015 ,how to do this ?

hello ,

          my question was if we are using count then if id is repeated thrice in same month then how to implemment it,daywise and monthwise.

          Thank you,

                                                                                                                                                       with Regards,

                                                                                                                                                        Sumit Jadhav.

Community Browser