Forum Discussion
Dax Logic
- Anonymous2 years ago
Hi lherbert501
You can refer to the following solution.
The sample data is the same as yours
1.Create a rank column
Rank = RANKX ( FILTER ( 'Table', [Item] = EARLIER ( 'Table'[Item] ) && [Date] = EARLIER ( 'Table'[Date] ) && [Country] = EARLIER ( 'Table'[Country] ) ), [Location], , ASC )2.Create a result column
Result = IF([Rank]=1,[Qty])Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
look carefully, this is what you are looking for
- Ahmedx2 years agoSuper User
should I explain it or should you
I just wanted to reproduce your logic if I understood correctly
added a new column and there should be the word priority- lherbert5012 years agoPost Prodigy
I need something like
If Location =' Location 1' and item,date and country match to location 2's (so it already exists for the other location) then take quantity from location 1, else location 2.
- Anonymous2 years agoNot applicable
Hi lherbert501
You can refer to the following solution.
The sample data is the same as yours
1.Create a rank column
Rank = RANKX ( FILTER ( 'Table', [Item] = EARLIER ( 'Table'[Item] ) && [Date] = EARLIER ( 'Table'[Date] ) && [Country] = EARLIER ( 'Table'[Country] ) ), [Location], , ASC )2.Create a result column
Result = IF([Rank]=1,[Qty])Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.