Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kumarleau
Contributor
Contributor

Need help to undersatnd the formula

Hi All,

 

I don't know anything about Qliksense/QlikView. I just want to understand one

Sum(aggr(sum({<[Status]={'Open'}>} [Duration]),[Name]))

 

What it is doing exactly.

Can someone help me how to convert this into SQL query

Regards,

Kumar

1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

Hi Kumar,

Let me break it down for you. This is using Set analysis and the aggr function.

Sum(                                                                                                        // sum total of the each Sum(Duration) by Name
           aggr(                                                                                              // aggr is aggregating the measure, Sum(Duration) by Name
                      sum(                                                                                  // sum of Duration
                                 {<[Status]={'Open'}>}                                     // where Status = Open
                                                                            [Duration])
                        ,[Name])                                                                       // broken down per Name value
)

Hope this helps

View solution in original post

4 Replies
Lisa_P
Employee
Employee

Hi Kumar,

Let me break it down for you. This is using Set analysis and the aggr function.

Sum(                                                                                                        // sum total of the each Sum(Duration) by Name
           aggr(                                                                                              // aggr is aggregating the measure, Sum(Duration) by Name
                      sum(                                                                                  // sum of Duration
                                 {<[Status]={'Open'}>}                                     // where Status = Open
                                                                            [Duration])
                        ,[Name])                                                                       // broken down per Name value
)

Hope this helps

kumarleau
Contributor
Contributor
Author

Thanks a lot for responding to my query.

So if i am not wrong the sql query is like as below

select sum(duartion) from table where [Status]='Open' group by Name

 

Can you correct me if I am wrong.

Regards,

Kumar

Lisa_P
Employee
Employee

Yes. But this syntax will not work in a load statement, just in the visualizations

kumarleau
Contributor
Contributor
Author

Thanks. This qlik formula I have to convert into sql for some other purpose.

This is the reason I am trying to understand the qlik formula.

Thanks once again for giving valuable suggestion.