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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Min/Avg based on group of values


Hi All,

We are having the requirement to group the premium based on the client and take the average and Min. I need to do this at UI level as there will be more filters attached.

I have attached a sample qvw. Please let me know if any more information is required.

Thanks,
Sijo

1 Solution

Accepted Solutions
rubenmarin

Hi Sijo, you can use:

if(BenchMarkingBand='Minimum',Min(Aggr(Sum(Premium), [Client Name])),

    if(BenchMarkingBand='Average', Sum(Premium)/ Count(DISTINCT [Client Name])))

View solution in original post

2 Replies
rubenmarin

Hi Sijo, you can use:

if(BenchMarkingBand='Minimum',Min(Aggr(Sum(Premium), [Client Name])),

    if(BenchMarkingBand='Average', Sum(Premium)/ Count(DISTINCT [Client Name])))

Not applicable
Author

Thanks