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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Pillic
Helper II
Helper II

AND logic filter measure

Hi community,

 

I have a table that holds multiple SAMPLE_IDs that include multiple MATNR. Now I need an AND logic measure to get distinct SAMPLE_IDs when each selected MATNR is included.

 

SAMPLE_IDMATNR
1A
1B
1C
1D
2A
2C
2D
3B
3D

 

In this sample I want to use MATNR as slicer and if I select MATNR B and D the result should be:

SAMPLE_ID
1
3

 

How can this be achieved?

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

ThxAlot_0-1711103085587.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

ThxAlot_0-1711103085587.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



ThxAton @ThxAlot ,

this is exactly, what I was looking for.

Great TY

Pillic
Helper II
Helper II

Hi @Uzi2019,

 

1 and 3 are the distinct SAMPLE_IDs which have the MATNR: B AND D included.

So when the selection of MATNR: B AND D is available in any SAMPLE_ID I need the distinct SAMPLE_IDs as result.

Thanks for having a look into this,

Uzi2019
Super User
Super User

Hi @Pillic 

 

Didnt get your expected answer logic. what represents 1 and 3 in your output??

if you see the input you have it has 2 B and 3 D right??

Uzi2019_0-1711095840302.png

 

you want the count of sample Id??

 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors