Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Dynamic Classification from Companys

Hi, 

 

I want to make a dynamic classification where the User can select step sizes of a classification and the number of classes. 

 

This is the situation:

 

CompanySales
A10
B50
C80
D100

 

If the user select step size 50, there should be 2 classes with: 0-50 (class 1) and 51-100 (class 2). In the classes the sales should be added, so class 1 has a sum of 60 and class 2 a sum of 180

If he selects step size 20, there should be 5 classes. (class 1: 0-20, ..., class 5: 81-100
The number of classes depends on the maximum of the sales amount and we should watch for rounding.

 

I thought of connecting another table who has just the step sizes from 1:1000 and the user can select a number he wants to see. 

 

Is there any possible way to do this? 

Thanks in advantage. I have an example pbi, where I made a manuell classification with; 

 

Sales Values Classification _ 1 = SWITCH(True(), 'Sales per Company'[Sales] < 10,"<10€",AND('Sales per Company'[Sales] <= 40,'Sales per Company'[Sales] >= 10),"10-40€",AND('Sales per Company'[Sales] > 40,'Sales per Company'[Sales] <= 70),"40-70€",AND('Sales per Company'[Sales] >70,'Sales per Company'[Sales] <= 110),"700-110€",'Sales per Company'[Sales]>110 ,">110€")