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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight table blank fields - using set analysis

HI all

I am having issues with a table. I cant make data show in Avg B or Avg C columns. The data only appears in Avg B or Avg A when i select an individual month using a 'Month' List box.

I can't understand why i have to select a month for the data to appear.

MonthAvg AAvg BAvg C
Dec11652889827
Jul12598--
Jun12605--
Aug12685--

Avg A formula = Avg(Rank_1_Premium)

Avg B formula = avg(aggr(Max({$<[Insurer]={'eCar'},[Premium]={'<99999'}>} [Premium]) ,RiskNo))

Avg C formula = avg(aggr(Max({$<[Insurer]={'Asda OE'},[Premium]={'<99999'}>} [Premium]) ,RiskNo))  

Can you help?

J

 

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Oh, I've got it.

You discard Month dimension during aggregation.

Use this kind expression:

=avg(aggr(Max([Premium]) ,RiskNo, Month))

View solution in original post

15 Replies
whiteline
Master II
Master II

Try to use double quotes {"eCar"} instead of {'eCar'} in your set epressions.

Not applicable
Author

Hi

thanks for the reply. But that Hasn't Made a Difference

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Lets have a sample data in excel file, please

Regards,

Gab

Not applicable
Author

Sample of the base data?

James Makepeace

MI Analyst - Stats & Actuarial Team

Southern Rock Insurance

Tel: 01454635844

whiteline
Master II
Master II

Ok, try them step by step.

First without sets

avg(aggr(Max([Premium]) ,RiskNo))

Then

avg(aggr(Max({$<[Insurer]={"eCar"}>} [Premium]) ,RiskNo))

And then

avg(aggr(Max({$<[Insurer]={"eCar"},[Premium]={"<99999"}>} [Premium]) ,RiskNo))

to localize the issue.

Not applicable
Author

All 3 of those steps return blank fields unless I select a certain month

James Makepeace

MI Analyst - Stats & Actuarial Team

Southern Rock Insurance

Tel: 01454635844

whiteline
Master II
Master II

So your problem is not connected with set analysis.

Try to get the first one work.

Or provide some test data.

Not applicable
Author

Apologies but what is test data??

Would this be the base data set?

Not applicable
Author

i believe the issue to be with the Aggregation of the data. (something im not fantastic at). the reason i think this is when i tinker with the Aggr it populates the fields.

Although when i tinker it takes the one row which was correct, to four rows which are incorrect.

Regards