Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lohitala
Contributor
Contributor

Aggr Function

Hi All, could you please help me out with this expression where i am going wrong.

In the chart it show the same values that is not expected.

=count(Aggr(if($(=num(count( {<TopBox={'1'},FiscalYear={'2018'}>}SRID)/count( {<FiscalYear={'2018'}>}SRID),'#.00000'))>=percent1,QuestionLabel),percent1,QuestionLabel,FACILITY,Srnumber1))

5 Replies
jcampbell474
Creator III
Creator III

Are you intentionally aggregating on percent1,QuestionLabel,FACILITY,Srnumber1, because they're not a dimension (w/the exception of FACILITY)?


I'm thinking you've aggregated w/too many fields.  You can try removing one aggregation at a time and see if your values change.

HTH,

Jason

lohitala
Contributor
Contributor
Author

Actually those are all Dimension field.

I have to aggregated it those level i think there is problem with dollar expansion in Aggr function.

Anil_Babu_Samineni

How about this? I am assuming percent1 is not the field?

=count(Aggr(if(num(count( {<TopBox={'1'},FiscalYear={'2018'}>}SRID)/count( {<FiscalYear={'2018'}>}SRID),'#.00000')>=percent1,QuestionLabel),percent1,QuestionLabel,FACILITY,Srnumber1))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rubenmarin

Hi Lohit, dollar expansion is processed before the table is calculated, so the stepsa are: this dollar expansion is calculated, returns a number, and this number replace the dollar expansion in expression, so all dimensions uses the same numbers, ie:

=count(Aggr(if(0.8>=percent1,QuestionLabel),percent1,QuestionLabel,FACILITY,Srnumber1)) // 0.8 just as an example of how the expression is expanded.


Anil expression below should work.

jcampbell474
Creator III
Creator III

Sorry, I wasn't clear.  Yes, they are dimensions, just not dimensions in the chart you're referencing.  I initially thought your were forcing aggregation outside of the chart dimensions.