Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table with data.Employees and I want to display only all employees who have more than 10:00.
So I need the sum of datafield.az if the sum of datafield.az it is greater than 10:00 (hh:mm).
I can't use "if" because otherwise not only the dimensions of employees above 10:00 would stop, but also others.
Can you help me, please?
Just with these data you couldn't avoid an-if-loop, maybe like:
sum(aggr(if(sum(AZ) > 10:00, sum(AZ)), Employees, Datefield))
Depending on further requirements it may also be useful to pre-calculate all of the essential logic within the data-model.
I wonder, how your data looks like, you can do like below without IF...
Only({<datafield.az={">=10:00"}>} data.Employees)
Thanks for your reply.
The data looks like:
employees datefield az
A 03.04.2025 8
A 03.04.2025 3
So I need the sum.
This could be round robin response, to avoid too many conversations can we have raw data to test with?
I have a table containing employee names, dates, and the hours worked per date.
In some cases, there may be two entries for the same employee on the same date. Therefore, it is essential that the formula sums up the working hours accordingly.
I want to create a table that only shows employees and dates where the total working time exceeded 10 hours. The working time is formatted as hh:mm.
Temp:
LOAD * INLINE [
Employees Datefield AZ
A 01.01.2025 8:00
A 01.01.2025 3:00
A 02.01.2025 7:30
A 03.01.2025 9:00
A 04.01.2025 10:15
B 01.01.2025 7:00
B 01.01.2025 2:00
B 02.01.2025 11:00
B 03.01.2025 8:45
] (delimiter is ' ');
Result must be:
A 01.01.2025 11:00
A 04.01.2025 10:15
B 02.01.2025 11:00
Just with these data you couldn't avoid an-if-loop, maybe like:
sum(aggr(if(sum(AZ) > 10:00, sum(AZ)), Employees, Datefield))
Depending on further requirements it may also be useful to pre-calculate all of the essential logic within the data-model.
Thank you @marcus_sommer,
I've used this formula before. It calculates correctly. However, the "if" clause displays values as "0." These should be hidden to show only employees who actually worked more than 10 hours.
Within the object-properties should be an option to hide the ZERO.
Thank you very much. I had overlooked the option in the add-ins. This definitely works!