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
Nurzh_17
Frequent Visitor

Filter rows in a table with conditions to a group of values

Hi Community, 

I have a table called Concurrent Documents. 

 

Nurzh_17_0-1683017744726.png

As you might have seen from above screen, every Drawing Number divided into Master and Copy(bold and grey) and inside one Master Drawing Numbers there can be several copies. 

If Document Category in {Master Document, Project Document} it is Master, If Document Category in {Project Working Copy, Working Copy} it is Copy

The task is that I need to display on table visual Master Drawing Numbers with their copies, however ALL Copy numbers ,must be in Reason for Issue = Z - As Built. 

And no matter what status have the Master Document. 

 

For example, in above screen first Master Document 010-0700-JJJ-LAY-20001-03 have copies with Reason For Issue not Z - As Built and we don't need this rows. All copies need to be in Z - As Built. Just like this example: 

 

Nurzh_17_1-1683018756013.png

 

Hope I explained correctly, 

Thank you for your help! 

 

 

6 REPLIES 6
tamerj1
Super User
Super User

Hi @Nurzh_17 

place the following message in the filter pane of the matrix visual, select "is not blank" then apply the filter

FilterMeasure =
COUNTROWS (
FILTER (
'Concurrent Documents',
'Concurrent Documents'[Document Category]
IN { "Master Document", "Project Document" }
|| 'Concurrent Documents'[Reason] = "Z - As Built"
)
)

Hi @tamerj1 , 

In this case i get the Master Documents that appears without copies. 

In first table I placed the filter, and second as it is. 

Nurzh_17_0-1683023800456.png

How should I exclude this Master Documents that occurs alone, I need to display values only with existing Copies that equal to 'Concurrent Documents'[Reason] = "Z - As Built".

@Nurzh_17 

Would you please paste a screenshot of the dax code that you have used?

@tamerj1 
Here the screen, could you check please 

Nurzh_17_0-1683029180302.png

 

 

@Nurzh_17 

Please try

FilterMeasure =
COUNTROWS (
FILTER (
'Concurrent Documents',
'Concurrent Documents'[Reason] = "Z - As Built"
)
)

@tamerj1 

Now this do the same but ignoring Master Document that have other Reason for Issue Status. 

Nurzh_17_0-1683029526229.png

I need to display Masters with their copies which have Reason = Z and if Master Document even have one Copy in another Reason then we need to exlcude all rows with Master Document also🙂

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.