Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi to all, I'would appreciate if someone could help me to solve this:
I have a sales report that include SKU / Customer / Sales Quantity / Margin% and I need to classify in four cathegories my SKUs, to do that I create a Parameter for each measure to define the target number for each measure, Quantity and Margin. Based on those targets and real numbers, I've create a new column calculated, to categorize this two measeure in one, I mean, cathegory A, B, C and D, where, Cat A is when Quantity and Margin are higher than Targets parameters, Cat B is when Quantity is higher than Quanty Target and margin is lower than margin target. Cat C is when Quantity is lower than Quanty Target and margin is higher than margin target and Cat D is when Quantity and Margin are lower than Targets parameters.
The issue that I have is when I try to use this new column as an attribute, because based on that cathegory (A, B, C, D) I want to recaclulate quantities, margins and numbers of SKUs for each category A, B,C and D. Something like this:
Thanks,
Hi @juanesteban14 ,
According to your description, categories are reached by measure. You can create a table with all the categories, use this column in the visualization and calculate data such as the total quantity of each category in the fact table by the measure.
Here is my test for your reference.
Custom Table.
Table 2 = DATATABLE("Category",STRING,{{"A"},{"B"},{"C"}})
Measure.
quantity = SUMX(FILTER('Table',[Categories]=MAX('Table 2'[Category])),'Table'[Value])
——————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li
Calculated columns are immutable. You cannot base them on measures.
Power BI does not support dynamic binning. You need to bring your own buckets.