Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
arsenal1983
Creator
Creator

Advanced Aggregation

Hello,

I have the data as attached.

I need to count:

1. Number of Partners (PARTNER_NAME)

     a) only from PARTNER_GROUP = GR_01

     b) only from LIMIT_CATEGORY = LIMIT

     c) which in one QTR had at least 5 INVOICES (DOC_ID) overdue over 1 days (OVERDUE)

I need to know just one number (with no dimmennsions)

Luke

1 Solution

Accepted Solutions
arsenal1983
Creator
Creator
Author

Very close,

The correct answer is:

=count(DISTINCT

{$<PARTNER_GROUP = {'GR_1'}, LIMIT_CATEGORY = {'LIMIT'}, OVERDUE = {">$(vOVERDUE)"}>}

If(Aggr(count({$<PARTNER_GROUP = {'GR_1'}, LIMIT_CATEGORY = {'LIMIT'}, OVERDUE = {">1"}>} DOC_ID), PARTNER_NAME, PERIOD) >=5,  PARTNER_NAME))

Thanks for your help!

View solution in original post

4 Replies
Not applicable

Do you need to apply all three filters in one expression or separately ?

Not applicable

Try below:

Sum( {<PARTNER_GROEUP={"GR_01"},LIMIT_CATEGORY={"LIMIT"},OVERDUE={">=1"}>}

          IF(AGGR(Count({<PARTNER_GROEUP={"GR_01"},LIMIT_CATEGORY={"LIMIT"},OVERDUE={">=1"}>}DOC_ID) , PARTNER_NAME , PERIOD) >=5 , PARTNER_NAME)

       )

effinty2112
Master
Master

Try:

Count(DISTINCT Aggr(if(Min(Aggr(count({$<LIMIT_CATEGORY = {'LIMIT'}, PARTNER_GROUP = {'GR_1'}>}DOC_ID), PARTNER_NAME,PERIOD))>=5,PARTNER_NAME),PARTNER_NAME))

arsenal1983
Creator
Creator
Author

Very close,

The correct answer is:

=count(DISTINCT

{$<PARTNER_GROUP = {'GR_1'}, LIMIT_CATEGORY = {'LIMIT'}, OVERDUE = {">$(vOVERDUE)"}>}

If(Aggr(count({$<PARTNER_GROUP = {'GR_1'}, LIMIT_CATEGORY = {'LIMIT'}, OVERDUE = {">1"}>} DOC_ID), PARTNER_NAME, PERIOD) >=5,  PARTNER_NAME))

Thanks for your help!