Forum Discussion
Returning a value if cells are duplicate based on condition
Hello PBI community,
I need your help to create a column that returns only one value based on MAX Quantity, below is an example.
current data:
Condition. Quantities.
Absd1011. 1
Absd1213. 1
Absd1314. 1
Absd1011. 1
Absd1011. -1
Desired data:
Condition. Quantities. Duplication check.
Absd1011. 1 True.
Absd1213. 1 True.
Absd1314. 1 True.
Absd1011. 1 Blank/False.
Absd1011. -1 Blank/False.
So basically i just need to return only one value for distinct "Condition" with MAX Quantity "which is usually 1 or -1".
And in case two rows met the criteria to only take one row randomly.
I was able to create the code for first part but I'm stuck in the second part which is most important for my case where i have to pick only one row randomly.
Thanks in advance:)
what about use the group by function in the PQ?
2 Replies
- ryan_mayu
Super User
what about use the group by function in the PQ?
- AnonymousNot applicable
Hi OmarMonzer ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng