Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
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

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