. I have a task about ABC analysis revenue by Clients, Items, SalesPersons, etc. And I've created it according to measures below. And now I'm strugling with filtering by categories A,B,C separately. For example, I made segmentation by A,B,C for Clients Revenue. And then I need to filter Items Revenue corresponding to "A" Clients Revenue. Table Revenue includes Client_key, Item_key, Amount fields. Maybe you can recommend a solution how to display now Item,Amount in a separate table which would correspond to Clients_key fitting for "A" category?
What I have:
- The measure which I use to get Items and Revenue Amount is
_Key_Measures[NeededRevenue] = SUMX(filter(SUMMARIZE(Revenue,Revenue[Client_Key],Revenue[Item_Key],"Cat",_Key_Measures[ClientABC],"Rev",[TotalRev]),[Cat]="A"),[Rev])
But it doesn't work properly. As
SUMMARIZE(Revenue,Revenue[Client_Key],Revenue[Item_Key],"Cat",_Key_Measures[ClientABC],"Rev",[TotalRev])
isn't correctly summarized Client_key and Item_key (not all Item_key are summarized ).
But if we remove "Cat",_Key_Measures[ClientABC] from that, SUMMARIZation works properly.
_Key_Measure[ClientABC] = if([ClientRevC%] <=0.7, "A",if([ClientRevC%]<=0.9, "B","C"))
ClientRevC% = var CurrentTotal=SUM(Revenue[Amount]) var TotalRev=calculate([TotalRev], ALLSELECTED(Revenue)) var CumTotal= SUMX( filter(SUMMARIZE(ALLSELECTED(Revenue),Clients[Client],"Revenue Total",SUM(Revenue[Amount])), [Revenue Total]>=CurrentTotal), [Revenue Total]) return divide(CumTotal,TotalRev,0)
TotalRev = sum(Revenue[Amount])
Thank you in adavance.