Forum Discussion
Change DAX measure into Power Query Editor Custom Column
var consignee1=CALCULATE(Max(Client[Consignee]),ALLEXCEPT(Client,Client[ConsolNumber])
This would sort Consignee (and Consignor) alphabetically. Is that what you are intending?
- NickProp285 years agoPost Partisan
Dear lbendlin ,
Thank for the reply. Yes correct.
Here's the result when consignee or consignor condition have been meet.
If there is more than one brands in Consignee/Consignor column, there will have result as 'MIX'.
So doesnt matter if is sort in aplhabetically.
Thank you
- Ashish_Mathur5 years agoSuper User
Hi,
Please explain the logic. For C001, why is the answer NIKE and not ADIDAS? Please also explain the logic of the other ConsolNumbers.
- NickProp285 years agoPost Partisan
Dear Ashish_Mathur ,
Thank for your attention.
Some operations have incorrectly input the data into system. Supposedly in one consol number, there is only have one brand in Consignee/Consignor. Like C002 and C003, this is correct input.
After we have the discussion, we come out some filter as below:
i.) if only one brand in consignee or consignor, prioritise Consignee. (C001)ii.) if only one brand in consignee, and more than one brand in consignor, prioritise Consignee. (C002)
iii.) if only one brand in consignor, and more than one brand in consignee, prioritise Consignor. (C003)iv) both of it having more than one brand, stated "MIX" (c004)
v.) if there have null value in consignee, but consignor have one brand, prioritise Consignor (Same if consignor have null value)
vi.) if consignee/consignor have null value but also one brand, like C009 and C010. We will prioritise this particular column.
So at the end, we have captured Consignee/Consignor (which is correct input) and take action on those MIX/Blank consol number.
I checked on this calculate column, all result had return correctly. But I would like to have some help to convert this into Power Query.
Hope you can provide some help on it. Greatly appreciate!