Forum Discussion
Help with ABC Customer categorizing - DAX
- 1 year ago
Slightly confused what you're expecting (please explain) - this is the result I get when I add your existing measure with the new measure I made:
Hi,
I'd recommend making calculated tables along the way so that you can see the outputs (e.g. output Products in class as a calculated table and make sure it's what you're expecting). Then it'll be much easier to see where it's going wrong.
Hello pbiuseruk good afternoon.
Yes, I tried that and know that the issue is in the OR clause (since based on profitability it would fall in one category and based on revenue on another)... The issue is that I could not find a way to return only one category and prioritize the upper one (A->B-> C)...
Thank you for the input 🙂
- pbiuseruk1 year agoResolver IV
If you can see there's multiple values being returned in the table and you only want one based on precedence, then you'd need to do an if or switch condition in the Result variable. e.g. If category A exists, then take value A, if Category B exists then take value B, etc...
- Okazakipedro1 year agoHelper I
Hello, the issue here is that the columns are A,B,C And the Measure is bringing the profitability, I can't do a switch case...
VAR SalesByProduct =CALCULATETABLE (ADDCOLUMNS (SUMMARIZE ( SampleData, SampleData[Controlling Customer Code] ),"@ProdSales", [measure_job_totalProfitEur]),ALLSELECTED ( SampleData ))This is what is bringing the profitability.- pbiuseruk1 year agoResolver IV
It's hard for me to visualise this but if you share a PBIX file with some dummy data in there, I can take a look.