Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Qlik Cloud Maintenance is scheduled between March 27-30. Visit Qlik Cloud Status page for more details.
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

How to hard code an ABC analysis in script?

Hey guys,

I am following the to perform an ABC analysis in work sheet mode. However, I would like to hard code an ABC-dimension in my data for customers.

I tried the following: creating a mapping table with CustomerID and the ABC dimension, based on the sales table. Code-wise it looks like this (I used the ABC code provided by Henric in the original post):

Mapping Load
Aggr( If((Rank(Sum(Net),1)-1) / Count(distinct total CustomerID)< 0.50, 'A',If((Rank(Sum(Net),1)-1) / Count(distinct total CustomerID)< 0.75, 'B', 'C')),CustomerID)
Resident Sales
Where year(Date)=2021 group by CustomerID;

However, Aggr & Rank do not work in the script, besides I didn't give any sorting order.

Does anyone know how this would work? I've only found dynamic topics in the forum, not this static option.

Thanks and best


Labels (1)
0 Replies