Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
lbunnell
Creator
Creator

Average accounts in household when one of the account types is checking

HH #Acct #Account Type
12340123Checking
12340234Savings
12340345Money Market
23450456Savings
23450567Checking
34560678

Checking

34560789Savings
...

For a table like the one above, I'm looking to create a chart with an expression that indicates the average number of accounts within a household when the household has a checking account.

Something like:

if([Account Type]='Checking', count(distinct [Acct #]) / count( distinct [HH#]))

but I believe this expression this would only count the checking accounts per household. I need the average of the total number of accounts in each household and I need to aggregate in some way for a chart.

3 Replies
Anonymous
Not applicable

could you please elaborate a bit more, please create an example with households with and without 'Checking' account and tell what result you expect.

lbunnell
Creator
Creator
Author

Robin,

To clarify, in the above example, HH #1234 has 3 accounts, 1 of which is checking. HH #2345 has 2 accounts, 1 of which is checking. HH #3456 has 2 accounts 1 of which is checking. I'd like to show, for example, that households (HH) that have a checking account on average have a total of 2 accounts.

Thanks,

Lawrence

Anonymous
Not applicable

sorry, perhaps I'm a bit slow on the uptake today , I still don't understand you requirement