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
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
Resident Rockstar
Resident Rockstar

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 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.

Top Solution Authors