Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am new to POWERBI and thanks in advance for everyone's help. Here is my problem. I am trying to remove duplicates based on Scrap_Qty value. If Scrap_Qty=1, it shoud keep that row and filter any other row that has same serial_No but Scrap_Qty=0
Here is an example. For HC3078-05, It should keep the top row since Qty_Scrap=1 and then it should compare this serial number with all the other rows and filter out HC3078-05 with Qty_Scrap = 0 (last row in this case).
If i can do that at "transform data" stage, that will be awesome otherwise even a DAX function will work great. Appreciate the help on this!!
Hi @ilyaadna ,
In Power Query – Select the yellow label – select only the box that is 1.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the input Liu. What you are suggesting will filter out all the Qty_Scrap=0. However, what i want to do is to keep all the ScrapQty=1 and filter out only those ScrapQty=0 rows for which there is a serial_no duplicate with Scrap_Qty=1. Again, appreciate your help
@ilyaadna , Try a new column like
Flag =
var _cnt = countx(FIlter(Table, Table[Serial No] =earlier(Table[Serial No]) , Table[Serial No])
return
Switch(True() ,
Scrap_Qty in {0,1} , 1,
isblank(_cnt ) ,1 ,
_cnt=1, 1,
0)
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |