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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
SaltukBugra
Contributor
Contributor

how to calculate work days spent on each costumer?

hi,

I need to use aggr function or (any other function) to create a field that calculates total work days spent on each distinct customer number is it possible?

data looks like this,

Customernumber         WorkStartDate                     WorkEndDate

            23                             02.03.2022                             05.03.2022

            47                             05.04.2022                             11.04.2022

            45                             04.03.2022                             23.03.2022                              

            53                             02.02.2022                             04.02.2022

            23                             01.06.2022                             02.06.2022

            45                             01.05.2022                             08.05.2022

 

I am trying to use the expression

=sum(aggr(sum( NetWorkDays(WorkStartDate,WorkEndDate)-1) , distinct [Customernumber]))

but it does not work.

Labels (1)
1 Solution

Accepted Solutions
NitinK7
Specialist
Specialist

please check below

NitinK7_0-1654252252146.pngNitinK7_1-1654252268433.png

 

View solution in original post

2 Replies
eddie_wagt
Partner - Creator III
Partner - Creator III

Could you provide the expected output and visualization? I assume that you want to see something like this

Customernumber Workdays spent
23  5
45 19
47 5
53 3

 

Do you want to calculate it in the loadscript or use it as an expression in the visualization layer?

Regards Eddie

NitinK7
Specialist
Specialist

please check below

NitinK7_0-1654252252146.pngNitinK7_1-1654252268433.png