Forum Discussion
Facing problem with ABC Analysis. In the last two rows I am getting blank value for ABC Analysis
euro_sree Modify the PartRank calculation to include a secondary column for tie-breaking:
PartRank = RANKX(
ALL(PartInfo),
PartInfo[Calculated_PartCost] + (PartInfo[Part_PartNum] * 1e-10),
,
DESC,
DENSE
)
Ensure the CumulativeCost and CumulativeCostPercentage calculations remain the same:
CumulativeCost = CALCULATE(
[TotalMtlCost],
FILTER(PartInfo, PartInfo[PartRank] <= EARLIER(PartInfo[PartRank], 1))
)
CumulativeCostPercentage = DIVIDE(
PartInfo[CumulativeCost],
[TotalCostWOFilter],
0
)
The ABC Analysis calculation remains the same:
ABC Analysis = SWITCH(
TRUE(),
PartInfo[CumulativeCostPercentage] <= 0.40, "A",
PartInfo[CumulativeCostPercentage] <= 0.70, "B",
PartInfo[CumulativeCostPercentage] <= 1, "C"
)
By adding a small value based on Part_PartNum to the Calculated_PartCost in the PartRank calculation, you ensure that each part gets a unique rank even if the costs are the same. This should resolve the issue with the last two records not getting an ABC analysis value.