Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ISSUE using Class function and removing duplicate staff_ids

Issue: I have created 2 reports which suppose to be same value but Those reports as below: one report tells how many of them are contract employees are there and How many are permanent employees there. the issue is when ever I am creating the report which is detail level year wise list of employees, it is giving wrong result. To resolve I have tried below ways: In Calculated Dimension I have taken as below: code written in caluclated Dimension: =Dual(Replace(class(vMaxYr-Year(DOB),5),'$(vMaxYYYYMM)'}, [(h)Staff Employment Type ID] =  , //[(h)Sort Key] = {"=aggr(max({1}[(h)Sort Key]), [(h)Staff ID])"}, STF_DEMOGRPHCS_FLAG={'Y'}   //[(h)Sort Key]={'count(Aggr(MAX([(h)Sort Key]),[(h)Staff ID]))'} >} DISTINCT [(h)Staff ID]) Cn you please guid me how to reach my requirment that is instead of 72 i am getting value 99  for contract employees.

0 Replies