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: 
jheasley
Creator III
Creator III

Aggr Function Help

I am having trouble getting the Total number of hours to aggregate by Time Period.  I need the total hours for a time period to compare to the total number of hours per region and time period. 

Capture.JPG

for Jan 2020 I need each regions Recent Total to show 102, for Dec 2019 I need 176, etc.

I am currently using:

Sum({<[_recent]={1}>}Aggr(Sum({<[_recent]={1}>}timeSpentSeconds_u0),[Worklog Month])/60/60)

if i add the dimension of region, the totals in both columns are the same. 

 

6 Replies
Kushal_Chawda

may be this

Sum(total <[Working Month]>{<[_recent]={1}>}Aggr(Sum({<[_recent]={1}>}timeSpentSeconds_u0),[Worklog Month])/60/60)
juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Optionally I think in this case it is legal to use

Sum({<[_recent]={1}>}Aggr(NODISTINCT Sum({<[_recent]={1}>}timeSpentSeconds_u0),[Worklog Month])/60/60)

Hope this helps.

Juraj.

jheasley
Creator III
Creator III
Author

same result that i got

jheasley
Creator III
Creator III
Author

this didnt work either. attached is the result for both options.

Capture.JPG

lorenzoconforti
Specialist II
Specialist II

I think there might be a spelling mistake in one of the formulas; try


Sum(total <[Worklog Month]>{<[_recent]={1}>}Aggr(Sum({<[_recent]={1}>}timeSpentSeconds_u0),[Worklog Month])/60/60)

juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Hi @jheasley Both work for me, see attached app.