Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Group by function

Guys,

I want to group worked hours of an employee by month wise. But I'm having data as in the screenshot below, the table has multiple worked hours for an employee for a single or same date.

In this case when I use group by function in script, all the worked hours for a single date is not getting added and also I have used Month(Floor(Sheet_date), it is adding the worked hours which are unique to a single date but not the same values. Plz help me to do this...

Screenshot_13.png

I have also attached the sample excel sheet.

7 Replies
PrashantSangle

Hi,

can you attached your required output also???

Regards,

Prashant

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 🙂
Anonymous
Not applicable
Author

Screenshot_15.png

In this output, I'm getting correct data for the date '02/02/2017' - (3+5=8) but for the date '02/03/2017' it is showing wrongly as 4, but it has to show (4+4=8)..

PrashantSangle

Hi,

Try sum(aggr(sum(Worked_hours),resource_id))

Regards,

Prashant

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 🙂
Anonymous
Not applicable
Author

This can be used as an expression or can I use it in script.. I used this as an expression, but not working.

PrashantSangle

Hi,

Use as expression

instead of sum(Worked_hours)

updated expression,

sum(aggr(sum(Worked_hours),resource_id,proj_timesheet_id))


Regards,

Prashant

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 🙂
Anonymous
Not applicable
Author

Thanks. but it's not working bro... I have tried it, Plz say if any other way to do.

PrashantSangle

Hi,

Can you share your app???

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 🙂