Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Juleeees
Frequent Visitor

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€")




1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Juleeees 
This article seems to be just what you need:
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-size-of-bi...

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @Juleeees 
This article seems to be just what you need:
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-size-of-bi...

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.