I'm not sure what to call it. Maybe table variables can do this. Maybe predition profiler can.
In the end I would want a formula column ABC Class that is a result of at least two of what I'll call "global parameters". Basic ABC SKU classification sets cutoffs as the aggregate sum of all the SKUs set revenue %s. As should be 80% of revenue, Bs 15% and Cs 5%. For this example I'll make it even simpler, let's say the SKU gets classified as A, B or C by the sales on that SKU.
In the example below, there are three rules (which I did not code as a formula),set by two parameters.
- SKUs with sales of more than 1000 -> A
- SKUs with sales of more than 100 -> B
- The rest ->C
Example datatable
//create datatable
dt = New Table( "Slider Test",
Add Rows( 26 ),
Set Header Height( 47 ),
New Column( "SKU",
Character,
"Nominal",
Set Selected,
Set Values(
{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
)
),
New Column( "Sales",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
),
Set Display Width( 94 )
),
New Column( "ABC Class",
Character,
"Nominal",
Set Values(
{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
),
Set Display Width( 70 )
)
);
//create graph
dt <<Graph Builder(
Variables( X( :ABC Class ), Y( :Sales ) ),
Elements( Bar( X, Y, Legend( 6 ), Summary Statistic( "Sum" ) ) )
)
Example image. It would be great if I could type or have a slider for the two variables shown.
In the example below, there are three rules (which I did not code as a formula),set by two parameters (cutoff AB and cutoff BC).
- SKUs with sales of more than 1000 -> A then I show the result changing it to 1500
- SKUs with sales of more than 100 -> B then I show the result chaning it to 150
- The rest ->C
Thank you.