Forum Discussion
Help with ABC Customer categorizing - DAX
- 2 years 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:
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 🙂
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...
- Okazakipedro2 years ago
Helper 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.- pbiuseruk2 years ago
Resolver 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.
- Okazakipedro2 years ago
Helper I
Absolutely, attached a sample file:
https://drive.google.com/file/d/1J_XdL6Zi1Z5x0aqBIr54lYvuUrX32Xpg/view?usp=sharing