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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ss89
Helper II
Helper II

double filter with unique matching

Hello Community,

 

I need to filter in a visual object all the elements that have contemporarily these two conditions:

STAGE NAME: RECEIVING
CONDITION: APPROVED

&

STAGE NAME: SAMPLING
CONDITION: ONLINE

If I select the filter by stage name and by condition it filters everything that has receing approved and online and sampling approved and online instead I would like to display only the items that have receiving approved and sampling online.
Can someone kindly help me?

ss89_0-1680621298827.png

Thanks in advance!

1 ACCEPTED SOLUTION

Hi @ss89 

On the table that you have on the question add the measure to only see the cases where the condition is valid. 
Or you can add the measure as a filter in the visual and select "is greater than" 0.

 

 

Best regards

Bruno Costa | Impactful Individual

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍


You can also check out BI4ALL's website and our data solutions!

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


View solution in original post

10 REPLIES 10
onurbmiguel_
Super User
Super User

Hello @ss89 

 

My suggestion is that you create a measure that show the number os rows in the first or second condition. 

Something like this: 

Total_1 = 
CALCULATE(
    COUNTROWS('factTable'),
    or(
        AND(Stage Name = "RECEIVING" , Condition = "APPROVED"),
        AND(Stage Name = "SAMPLING" , Condition = "ONLINE")
    )
)

 

If you need more help please sahre a pbix with some dummy values. 

 

 

Best regards

Bruno Costa | Impactful Individual

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

You can also check out BI4ALL's website and our data solutions!

 

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Hello,

 

thanks for your propomt reply!

 

In this way, however, I get a total as a result; I would instead need to have only the list of all the activities that have these combined filters.

 

Thanks in advance!

Hi @ss89 

On the table that you have on the question add the measure to only see the cases where the condition is valid. 
Or you can add the measure as a filter in the visual and select "is greater than" 0.

 

 

Best regards

Bruno Costa | Impactful Individual

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍


You can also check out BI4ALL's website and our data solutions!

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Hi @onurbmiguel_ ,

thanks for your tips, it works!

 

The last thing: items that meet the two conditions at the same time (RECEIVING=APPROVED & SAMPLING=ONLINE) should be displayed only the item that has SAMPLING=ONLINE otherwise I risk having duplicates in the display

 

ss89_2-1680704049733.png

I would like to visualize only the lot_id with Sampling online.

 

Thanks in advance!

 

hi @ss89 

 

Try this one: 

Total_1 = 
CALCULATE(
    Distintcount(Lot_ID),
    or(
        AND(Stage Name = "RECEIVING" , Condition = "APPROVED"),
        AND(Stage Name = "SAMPLING" , Condition = "ONLINE")
    )
)

 

like this the total will be right 

 

Best regards

Bruno Costa | Impactful Individual

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

You can also check out BI4ALL's website and our data solutions!

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Hi @onurbmiguel_ ,

 

the formulas does not satisfy both the rules; all these stages have "Complete" as CONDITION column. I would like to visualize only the LOT_NUMBER that have both STAGE_NAME=RECEIVING, CONDITION=APPROVED & STAGE_NAME=SAMPLING, CONDITION=ONLINE.

Thank you

ss89_0-1680781133019.png

ss89_1-1680781287300.png

 

 

Hi @onurbmiguel_ ,

 

I would like to share the pbix with some dummy values.

How can I insert the pbix in the reply?

 

Thanks in advance!

All the best

Hi @onurbmiguel_ ,

 

the following error message appears:

 

"Too many arguments passed to the DISTINCTCOUNT function. A maximum of 1 arguments are allowed"

ss89_0-1680764010037.png

 

HI @ss89 

Nice that i was helpful , can you accept my solution?

 

Best regards

Bruno Costa | Impactful Individual

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

You can also check out BI4ALL's website and our data solutions!

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Hi @ss89 

Sorry the delay, please reply alway in the last message otherwise it will be difficult to see your feedback.

 

some notes: 

  • in the the first message i told you to creat a measure not a calculated column 
  • in the erro that you show you need to close the parentheses in the distinct count 
  • to share a file you need to creat a share link in onedirve or goggle drive 

 

i will wait for your feedback

 

 

Best regards

Bruno Costa | Impactful Individual

 

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors