Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I’m trying to create a reusable categorization dimension based on my master item CALCUL_%_GROWTH.
The goal is to classify the values into four percentage categories:
< 15
<35
< 75
≥ 75
Here’s the expression I’m currently using:
Aggr(
If(fabs(CALCUL_%_GROWTH) < 0.15, '< 15%',
If(fabs(CALCUL_%_GROWTH) < 0.35, '< 35%',
If(fabs(CALCUL_%_GROWTH) < 0.75, '< 75%',
'≥ 75%'))),
Customers
)
This works, but I’m running into two issues:
I need to duplicate this expression for each dimension (e.g., Customers
, Products
, etc.), which makes it not reusable.
The filtering doesn’t work globally across all categories — it only applies to the dimension used inside the Aggr()
function.
I’d like to know if there’s a better way to define this categorization once and make it work across multiple dimensions while keeping the filtering consistent.
Thanks a lot for your help and suggestions
Hi
May be this
If(
Aggr( fabs(CALCUL_%_GROWTH) ,Customers,Products) < 0.15 ,'< 15%' ,
If(
Aggr( fabs(CALCUL_%_GROWTH) ,Customers,Products) < 0.35 ,'< 35%' ,
If(
Aggr( fabs(CALCUL_%_GROWTH) ,Customers,Products) < 0.75 ,'< 75%' , '>= 75%
)))