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

Transaction date should be segregate based mov type 542 and 653 .

Dear All,

I am wondering to do the logic of below table.

Requirement: I have below table based on the table i want to segregate the Trans Date based on mov type 542 and 653 for Emp_id.  Provided the below sample data and with results.

Raw Data
Emp idSeqIDMatYrMov TypeTrans DateTxn Time
223201954231.08.201912:57:21
229202165316.07.202113:14:58
253201954231.08.201912:57:21
257202065303.03.202016:47:28
1145202054230.10.202009:53:23
11420202165302.02.202117:24:50
      
      
Results
Emp id542 Date653 DateDate diff  
2231-08-201916-07-2021685  
2531-08-201903-03-2020185  
11430-10-202002-02-202195  

 

I would like to request to provide your logic for this requirement. let me know in case of any clarification in requirement.

 

Regards,

Irshad Ahmad

5 Replies
Taoufiq_Zarra

@mcaahmad93 

in chart you can use :

Dimension Emp id

and in measure :

=Only({<[Mov Type]={'542'}>}[Trans Date])

 

for 542 Date, and 

=Only({<[Mov Type]={'653'}>}[Trans Date])

 for 653Date, and 

=Only({<[Mov Type]={'653'}>}[Trans Date])-Only({<[Mov Type]={'542'}>}[Trans Date])

for Date diff

the output:

Taoufiq_Zarra_0-1628171315485.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
mcaahmad93
Contributor
Contributor
Author

Dear Taoufiq,

Thank you for your valuable time. I tried your expression and got some output.

But in my project output . we have to take multiple dimension and in a straight table and we have multiple mov_Type but we need to take only 542 and 653 date.

I am trying in script level and getting output like this. but we need each Emp id only one record.

mcaahmad93_1-1628176374101.png

mcaahmad93_0-1628176031974.png

Note:653 date should be greater 542 date.later we will calculate the date difference.

let me in case of any doubt in this.

Regards,

Irshad Ahmad

 

Taoufiq_Zarra

can you share a sample data and the expected output ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
mcaahmad93
Contributor
Contributor
Author

Dear Taoufiq,

please find the sample data with expected output below :

Sample Data:

Emp Id/BIC/YSERNRMOV_TYPETrans Date
81858818581012020-09-03
81858818581012020-11-27
81858818581012021-01-06
81858818582912021-02-15
81858818585412020-12-09
81858818585422020-12-11
81858818586412020-09-03
81858818586412020-11-24
81858818586412021-01-01
81858818586532021-01-28
1141843005961012020-09-10
1141843005961012020-10-31
1141843005961012020-11-05
1141843005961012020-11-29
1141843005961012021-01-29
1141843005961012021-01-30
1141843005961012021-02-06
1141843005962912021-01-30
1141843005965412020-09-22
1141843005965412020-12-11
1141843005965412021-02-06
1141843005965422020-10-30
1141843005966412020-09-04
1141843005966412020-10-30
1141843005966412020-11-03
1141843005966412020-11-14
1141843005966412021-01-27
1141843005966412021-01-29
1141843005966412021-02-06
1141843005966532020-08-28
1141843005966532021-02-02

Expected Output:

Emp IdYSERNRDate542Date653Date diff
81858818582020-12-112021-01-2848
1141843005962020-10-302021-02-0295

 

Note:653 date should be greater than 542 if not then we will not take Emp id of that  just skip.

Regards,

Irshad Ahmad

mcaahmad93
Contributor
Contributor
Author

Dear All,

Please provide some input on above requirement.

Regards,

Irshad Ahmad