Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone.
I could not find such a problem on the forum or on the Internet (there are similar problems but there are two or more source tables).
I need any help to filter the source table. In the source table there is a product category and each product has its own key. I would like to filter the source table so that only those products that match the product key with category C remain there. Now I filter separately category C into the table. And then, through the merge, I sort the source into categories A and B. But I can’t combine it all into one table back because of the loop.
I would like all three categories to be in one table and only the same keys as category C products.
Please tell me if it is possible to implement this in power query without cycling error?
Please see the attachment. https://drive.google.com/drive/folders/1kmHK3V9MkjHEfyqa7Za8v_G1vXbf4IOK?usp=sharing Change the location of the excel file in the "filename" parameter.
Region | Product | Store | Category | Price | Need | Distribution | Product on the way | Month | key |
SD | 896601218 | 3520 | A | 561,48 | 0 | 1 | 01.08.22 | 3520896601218 | |
SD | 896601224 | 3520 | A | 214,17 | 0 | 1 | 01.08.22 | 3520896601224 | |
SD | 896601225 | 3520 | A | 121,28 | 0 | 1 | 01.08.22 | 3520896601225 | |
UU | 70100319 | 1205 | C | 1,59 | 1 | 1 | 01.08.22 | 120570100319 | |
UU | 110101310 | 1205 | C | 11,65 | 1 | 1 | 01.08.22 | 1205110101310 | |
UU | 110301017 | 1205 | C | 19,57 | 1 | 1 | 01.08.22 | 1205110301017 | |
KN | 30407165 | 3510 | B | 0,73 | 1 | 1 | 01.10.22 | 351030407165 | |
KN | 71005023 | 3510 | B | 21,07 | 1 | 1 | 01.12.22 | 351071005023 | |
KN | 110001069 | 3510 | B | 1,41 | 1 | 1 | 01.11.22 | 3510110001069 |
Solved! Go to Solution.
=let a=Table.SelectRows(PreviousStepName,each [Category]="C"), b=List.Buffer(a[key]) in a&Table.SelectRows(PreviousStepName,each List.Contains(b,[key]))
=let a=Table.SelectRows(PreviousStepName,each [Category]="C"), b=List.Buffer(a[key]) in a&Table.SelectRows(PreviousStepName,each List.Contains(b,[key]))
Hi,
Not sure I follow are you looking to fitler on 2 seperate criteria at the same time? i.e.
= Table.SelectRows(#"Changed Type", each ([Product Code] = 123) and ([Category] = "C"))
This would show you any line where Product Code = 123 but only if Category = C
If thats not right can you give example of what you are trying to achieve/expect to see.
Thanks,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
54 | |
21 | |
12 | |
11 |