Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Filtering second table by only one element from line selected in first table

Hi all, first post here but frequent lurker.

 

I am trying to get to where when I select one line from the first table (image below), the second table will display inventory for the part number associated with that line, but grab inventory amounts from all facilities (labeled LOGCO)/warehouses across our enterprise.  The current measure I have to do this filters the part appropriately but only for the work order/facility/warehouse associated with the line item in the first table:

 

 

SelectedPartNum = CALCULATE(SELECTEDVALUE('LN_TSWCS410 - Work Order Activity'[T$ITEM]),FILTER('Warehouse Inventory','Warehouse Inventory'[Item]='Warehouse Inventory'[Item]))

 

 

How do I modify the SELECTEDVALUE above to only filter by item (part number)?

 

Image of what I want it to look like (I wrote in the other facility's inventory so you can see desired result vs. current result).

 

Thanks!

 

dbowman__0-1660585444023.png

 

*Lots of hiding data because my organization is incredibly sensitive about these things, apologies if it makes this harder to understand*

 

 

 

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Is there any relationship between the table 'LN_TSWCS410 - Work Order Activity' and 'Warehouse Inventory'? Could you please provide some fake data in these two tables with Text format and the explanation of your final expected result? And how did you set the first and second table visuals? It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
Super User

SELECTEDVALUE needs to be placed outside of the CALCULATE.  Read about using "variables" in DAX.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.