cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rygaard
Resolver I
Resolver I

Filter contains - If this item number is present on order show whole order.

I need to see all orders where one or more lines have a certain item number

(so I want to see everything the customors who bought redshirts have bought)

 

now i could filter for that item number but then i cannot see all the other items on that order.

 

Filter : item no =123

 

Orderitemshow line ?
1

123

yes
1456yes
1466yes
2789No
2456No
2466No
3123yes
3123yes
3123yes

 

 

So bassicly if item numer 123 has EVER been used on this order (within the other filter, date, department and so on I have on) I want to See ALL lines that match other filters.

 

Im lost - I could hardcode this on the table, but "123" needs to be a selectable value, next week we want to look at 398... and so on...

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Rygaard ;

You could create a table as a slicer .then create a flag measure apply it into filter.

1. create a table.

slicer = VALUES('Table'[item])

2.create a flag measure.

flag = 
var _sel=SUMMARIZE(FILTER(ALL('Table'),[item] in ALLSELECTED('slicer'[item])),[Order])
return IF(MAX('Table'[Order]) in _sel,1,0)

3.apply it into filter.

vyalanwumsft_0-1643007924262.png

The final output is shown below:

vyalanwumsft_1-1643007998115.png

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Rygaard ;

You could create a table as a slicer .then create a flag measure apply it into filter.

1. create a table.

slicer = VALUES('Table'[item])

2.create a flag measure.

flag = 
var _sel=SUMMARIZE(FILTER(ALL('Table'),[item] in ALLSELECTED('slicer'[item])),[Order])
return IF(MAX('Table'[Order]) in _sel,1,0)

3.apply it into filter.

vyalanwumsft_0-1643007924262.png

The final output is shown below:

vyalanwumsft_1-1643007998115.png

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Daryl-Lynch-Bzy
Solution Sage
Solution Sage

Hi @Rygaard 
I think you might interested in understanding single or multiple values from a Slicer selection can be used to impact measure.  Please considering watching the following Curbal video to see if this helps.  DAX Fridays! #118: Get selected or multiple values from slicers using DAX - YouTube

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!