Filter Table Visualization to Return All Valid Line Items

Veritan

Active Member
Joined
Jun 21, 2016
Messages
385
Office Version
  1. 365
Hi all,

I've tried searching around online and haven't been able to find an answer to this yet. My goal is to create a visualization (probably just a standard table), but I want to filter the output based on the value of any one item. Here is a sample of how my data looks (heavily truncated).

Orders
Order NumberCustomerProductQty Remaining
1Test 1A0
1Test 1B0
1Test 1C10
2Test 2B0
2Test 2C0
2Test 2D0
3Test 3C10
3Test 3D0
3Test 3E20
4Test 4A0
4Test 4B0
4Test 4C0
5Test 5B10
5Test 5C20
5Test 5D30

Products
ProductSizeColor
ALargeRed
BMediumBlue
CSmallGreen
DLargeYellow
ESmallOrange

These are the 2 tables I am working with. They are related on the Product field. What I want to do is return all line items where at least 1 Qty Remaining is greater than 0 for any given Order Number. Done manually, the Orders Table would look like this when complete. Note that it includes all Order Numbers where at least one of the line items is greater than 0. But Order Numbers 2 & 4 are not included because all lines in there are 0. Does anyone have a DAX formula or something similar that would accomplish this? Thank you in advance!

Order NumberCustomerProductQty Remaining
1Test 1A0
1Test 1B0
1Test 1C10
3Test 3C10
3Test 3D0
3Test 3E20
5Test 5B10
5Test 5C20
5Test 5D30
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi,

with following M code ?

Power Query:
= Table.Combine(Table.SelectRows(Table.Group(Excel.CurrentWorkbook(){[Name="Orders"]}[Content], "Order Number", {"x", each _ }), each List.Sum ([x][Qty Remaining]) > 0)[x])

Regards
 
Upvote 0
Solution

Forum statistics

Threads
1,223,723
Messages
6,174,115
Members
452,545
Latest member
boybenqn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top