Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
satishqlik
Creator II
Creator II

flag

Hi Viewers,

how to create flage for

same employees(emp id) which having different doj

Any help will be appreciated!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Ohh, got it. Use Floor() like:

Capture.PNG

t1:

LOAD id,

     Date(floor(doj),'DD-MMM-YY') as doj,

     type

FROM

[modify.xlsx]

(ooxml, embedded labels, table is May);

LOAD id,

     Date(floor(doj),'DD-MMM-YY') as doj,

     type

FROM

[modify.xlsx]

(ooxml, embedded labels, table is Jun);

join

LOAD

id,

Count(DISTINCT doj) as count

Resident t1

Group By id;

final:

LOAD*,

If(count>1,1,0) as flag1

Resident t1;

DROP Table t1;

View solution in original post

21 Replies
micheledenardi
Specialist II
Specialist II

What is doj ?

Can you give us a better view of your data model/structure ?

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Anil_Babu_Samineni

You have to explain little more with data

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
satishqlik
Creator II
Creator II
Author

Date of joining

avinashelite

Explain with a sample data set

micheledenardi
Specialist II
Specialist II

Different "doj" compared to what ?

As loveisfail told, we need more details regarding your table structure.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
satishqlik
Creator II
Creator II
Author

I have a table with employee id and date of joining

I want to count employee who are having different doj


Let me take


Emp id 1 has two different doj's.


For this I want to create flag


How to accomplish this?

satishqlik
Creator II
Creator II
Author

Hi Avinash,

I have a table with employee id and date of joining


I want to count employee who are having different doj

Let me take


Emp id 1 has two different doj's.


For this I want to create flag


How to accomplish this?

satishqlik
Creator II
Creator II
Author

I have a table with employee id and date of joining

I want to count employee who are having different doj


Let me take


Emp id 1 has two different doj's.


For this I want to create flag


ultimately I want to count same employees who are having different DOJ.


How to accomplish this?

tresesco
MVP
MVP

Try like:

Input:

Load

          EmpID,

          DOJ

From <>:

Join

Load

          EmpID,

          Count(Distinct DOJ) as Count

Resident Input Group By EmpID;

Final:

Load

          *,

         If( Count>1, 1,0) as Flag

Resident Input;

Drop Table Input;