Forum Discussion
ABC Measure Counting with Keeping the Filters
Hello,
I ve created a new file from my actual file which has data, which I can not share.
1. No, the cummulative Sum describes the Sales Amount over the Product. In this visual for example I calculated the cummulative Sum divided by the total Sales Amount ( the orange line):
x-axis has all product names. This works good.
2. I dont get this error message. I ve created this message with the help of a youtube video. I ve understood how it s working. You can tell me an easier solution.
The goal of the measure is to figure out which products cause big Sales. So A Category Products are all Products up to 50% of the Sales.
But this measure is working, maybe a bit too complicated, but it s working. I just dont know how to count, how many A categories are there.
Greetings
Yannick
Chat GPT actually helped me. I have to create 4 Measures, similar to my ABC measure:
A Products: Count of A Products =
VAR TotalSales =
CALCULATE (
SUM ( FactOrderLine[price_totalPrice] ),
ALLSELECTED ( FactOrderLine )
)
VAR CurrentSales =
SUM ( FactOrderLine[price_totalPrice] )
VAR SummarizedTable =
SUMMARIZE (
ALLSELECTED ( FactOrderLine ),
DimProduct[name],
"Total Sales", SUM ( FactOrderLine[price_totalPrice] )
)
VAR CumulativeSum =
SUMX (
FILTER ( SummarizedTable, [Total Sales] >= CurrentSales ),
[Total Sales]
)
VAR ABCCategory =
IF(CumulativeSum/TotalSales<=0.5,"A",IF(CumulativeSum/TotalSales<=0.8,"B",IF(CumulativeSum/TotalSales<=0.95,"C","D")))
RETURN
COUNTROWS(
FILTER(ALLSELECTED(DimProduct), [Product ABCD] = "A")
)