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):
MappingABC: Mapping Load CustomerID, 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.