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

Adding together two aggr rangesum expressions

Hi

Is it possible to add together two aggr (rangesum()) expressions?

Individually the following two expressions give me what I'm expecting, but summing them means the second expression fails to calculate. 


= aggr(rangesum( above(Count( distinct {<Table = {"SIP"},[Course Title] = {"ImpP*"},Date={">$(=today())"},[Attended?] = {"Attended", "Booked", "In Progress"}>}[EmNo]),0,rowno(total))),MonthYearDate )

+aggr(rangesum(above(Sum( distinct {<Table = {"SIP"}, [Course Title] = {"ImpP*"}, Date={">$(=today())"}>}CTMAP),0,rowno())),MonthYearDate)

 

Thanks 

Sarah

 

Labels (1)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

Hi @Sa_Rah ,

Maybe this:

=aggr(rangesum( above(Count( distinct {<Table = {"SIP"},[Course Title] = {"ImpP*"},Date={">$(=today())"},[Attended?] = {"Attended", "Booked", "In Progress"}>}[EmNo]),0,rowno(total))
,
above(Sum( distinct {<Table = {"SIP"}, [Course Title] = {"ImpP*"}, Date={">$(=today())"}>}CTMAP),0,rowno()))
,MonthYearDate )

I hope it can helps.

Best Regards

View solution in original post

3 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @Sa_Rah ,

Maybe this:

=aggr(rangesum( above(Count( distinct {<Table = {"SIP"},[Course Title] = {"ImpP*"},Date={">$(=today())"},[Attended?] = {"Attended", "Booked", "In Progress"}>}[EmNo]),0,rowno(total))
,
above(Sum( distinct {<Table = {"SIP"}, [Course Title] = {"ImpP*"}, Date={">$(=today())"}>}CTMAP),0,rowno()))
,MonthYearDate )

I hope it can helps.

Best Regards

victormarcel036
Contributor
Contributor

Yes, it is possible to add together two aggr (rangesum()) expressions. However, without seeing your specific expressions and the data you are working with, it is difficult to determine why the second expression fails to calculate when you try to sum them.

Sa_Rah
Contributor III
Contributor III
Author

Thanks, this worked! 

(Apologies that my account automatically marks things as solutions, the Qlik team have looked into this and apparently it relates to my organisation's firewall.)