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

calculation from load script to set analysis

Hi All,

I have a script in load script which is as follows:

If(Match(TaskName,'Upload Content') and Match(Workflow_Name,'EMEA Content Upload and perform QC'),date(TaskAssignmentDate), '31/12/2025') as firstloaddate,
if(Match(TaskVerdict,'Ready for Review') and Match(Workflow_Name,'EMEA Content Upload and perform QC'),date(TaskCompletionDate), '31/12/2025') as PQC_earliest_approval_date,

Ceil(Interval(date(min(PQC_earliest_approval_date) )-date(min(firstloaddate)),'d')) as qc_duration,

 

How to write it in set analysis to achive same result of qc duration?

Data is already loaded so i have to do it in set analysis. Please help.

thanks,

Labels (3)
6 Replies
micheledenardi
Specialist II
Specialist II

You can't write IF inside of set analysis

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

firstloaddate=

Min({<TaskName={'Upload Content'},Workflow_Name={'EMEA Content Upload and perform QC'} >} TaskAssignmentDate) 

PQC_earliest_approval_date=

Min({<TaskVerdict={'Ready for Review'},Workflow_Name={'EMEA Content Upload and perform QC'} >} TaskCompletionDate)

 

qc_duration=

alt(Min({<TaskVerdict={'Ready for Review'},Workflow_Name={'EMEA Content Upload and perform QC'} >} TaskCompletionDate),date#('31/12/2025','DD/MM/YYYY'))

-  Min({<TaskName={'Upload Content'},Workflow_Name={'EMEA Content Upload and perform QC'} >} TaskAssignmentDate),date#('31/12/2025','DD/MM/YYYY')) 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

if this worked for you, please close the thread by accepting it as solution 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nroy12
Contributor II
Contributor II
Author

no its not solved. i would need qc duration as dimension in order to be able to filter on it and posssibly a group by on the qc dutation.  like ❤️ days , 3 to 5 days, 5 to 10 days and > 10 days like this

mentioned as follows:

i had to put this expression in the measure instead of dimension. but i have achieve result like following:

here the left side  less than 3 days , 3-5 days this grouping is the dimension i wanted to count by  above duration expression.

actual result i am getting now:

nroy12_0-1651751560462.png

 

 

expected result:

nroy12_1-1651751560450.png

 

thanks

vinieme12
Champion III
Champion III

If you need it as a dimension to be filtered on then keep it as it is in your script 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nroy12
Contributor II
Contributor II
Author

yes its not possible at this moment to keep in script so was thinking if this grouping can be done with value list but no success yet. thanks