Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
nroy12
Contributor II
Contributor II

Dataload editor script

Hi All,

I have some record where document id is repeating according to the workflow status( preparation, review, approved). i would need to count the document id and sum it because if the uploading of the document repeats then it should count 2 2 , in case three times upload happens then count 3.

but in the final result i want to see group by on document number  and count of the document. my load script looks like below: 

source:
LOAD
Workflow_Name,
Workflow_Owner,
Workflow_Status,
WorkflowStartDate,
"DocumentName",
DocumentNumber,
"Type",
Subtype,
Version,
TaskVerdict,
TaskVerdictComment,
TaskVerdictReason,
EMEAProjectOwner,
TaskName,
NoOfFields(TaskName) as upload_counter ,

If(WildMatch(TaskName,'*Upload Content*') and WildMatch(Workflow_Name,'*Upload*'),1) as counter,


TaskOwner,
TaskAssignmentDate,
If(WildMatch(TaskName,'*Upload Content*') and WildMatch(Workflow_Name,'*Upload*'),date(TaskAssignmentDate), '31/12/2025') as firstloaddate,


TaskCompletionDate,
Country
FROM [lib://PHARMA - DATAMARTS/Bene/EMEA - BeNeLux Workflow Report_Feb.xlsx]
(ooxml, embedded labels, table is Sheet0);

file_upload_counterTable:
Load
distinct
DocumentNumber,
Workflow_Owner as 'Owner',
Workflow_Status,
WorkflowStartDate,
DocumentName,
Sum(counter) as Counter
// firstloaddate
Resident source
Group By DocumentNumber,
Workflow_Owner ,
Workflow_Status,
WorkflowStartDate,
DocumentName;

 

 

 

my result coming wrong. The document number is repeating in the result. can anyone help me with the result where i can get distinct document number with respect to accumulative sum of number of upload.

 

result below:

nroy12_0-1645304325719.png

 

Labels (2)
3 Replies
PrashantSangle

Remove FirstloadDate field from chart as well as in chart use expression sum(Counter)

 

If this don't work then provide sample data with expected output.

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
nroy12
Contributor II
Contributor II
Author

i have tried removing the firstloaddate and also taken sum(counter), still its repeating. its not working.

nroy12_0-1645351473190.png

 

PrashantSangle

What is your expression for Counter in chart???

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂