This is a migrated thread and some comments may be shown as answers.

How to sum time component using aggregate SUM(HH:MM)

1 Answer 385 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Raed
Top achievements
Rank 1
Raed asked on 26 May 2019, 11:27 AM

Hello

I Have a column that has data in the date - HH:MM format, example "00:22", how to sum all the values in that column. 

One more thing the data is coming from a JsonDataSource that has null values in date column, using the (IsNull, ??, IIf) to check for null does not seem to work. for example: =IIF(Fields.actualWorkHrs Is NULL, "T", "F") always returns falls even when there are null values in the actualWorkHrs  field

 

thanks. 

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 29 May 2019, 01:25 PM
Hi Raed,

DateTime values cannot be summed. Instead you can get the hours and minutes from the field and sum them. Note that Sum() aggregate function skips the NULL values, so you don't need to include Is Null check in the expression.

As for the expression checking if the field is NULL, you are correct. I also made some tests and it seems that it will only returns True if the entire property is missing. For example, check this screenshot: https://www.screencast.com/t/JUP9rsB8. However, this is not an expected behavior and we consider this as bug. I have logged it on your behalf on our Feedback Portal as Bug Report (JsonDataSource evaluates NULL values incorrectly) and also vote for it. This way you can follow the status of the item and when will be released. As a token of gratitude, I have updated your Telerik points. Thank you for bringing this to our attention.
 
Best Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Report Designer (standalone)
Asked by
Raed
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or