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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr function - use universe of dimension

Hi All,

I have an expression:

aggr(sum({<Agent_Monthly_Year={$(vMaxYear)},Agent_Monthly_MonthNo={'<=$(=vMaxMonth)'}>}[# errors])/

  avg({<Agent_Monthly_Year={$(vMaxYear)},Agent_Monthly_MonthNo={'<=$(=vMaxMonth)'}>}[# policies]),AgentHeader1,Agency_Code)

Even if a value of Agency_Code is selected, I want the formula above to evaluate for all values of Agency_Code and matching other conditions mentioned in the statement.

Basically I want {1}Agency_Code but this does not work in the aggr function.

Please advise.

Shweta

1 Reply
Not applicable
Author

Svetlana,

The function aggr() will return a "temp" table according to the selections made (the user state)

If you want a table with all Agency_Code, I think you will need to use a avg or sum({set analysis} aggr() )

If you want to complete the set analysis with all the agency codes according to a test (one single value selected), you need to populate a variable (as a formula) that will be either nothing or  ', Agncy_Code= ' so that you can do $(thisvariable) into your set

Fabrice