Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting the results for the average of users

I have a data of customer_code which have some identical due to the invoices. i have to count the invoices for each customer_code and add them up in which i divide it by 12 months which gives me the average. i do this for 2 different years 2016 and 2017. the averages are then compared if the average for year 2016 is higher than 2017 i get the result declining vice versa. how do i count the result into two columns for declining and growing.

4 Replies
adamdavi3s
Master
Master

This isn't much to go on but you can simply use the names you've given your expressions

if(2017expression < = 2016expression, 'Declining','Growing')

sasiparupudi1
Master III
Master III

Something like Below?

if(

avg(Aggr(Count({<Inv_Year={2016}>}InvoiceNo),customer_code,Inv_Month))

<

avg(Aggr(Count({<Inv_Year={2017}>}InvoiceNo),customer_code,Inv_Month))

,'Growing','Declining')

Not applicable
Author

Thx got it to work

Not applicable
Author

Thx it worked