cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filtering out 'blank' results in a Matrix

I have a Matrix where the rows are Employee Names, columns are the Day & Date and the values are a Measure that is essentially a nested If that looks up whether the employee accessed a door on the given day & whether they had been approved to. The result of the measure colous the cell where:

  • Red (#ff0018) = Approved, but didn't Access
  • Green (#108372) = Approved, and Accessed
  • Angry Red (#840029) = Accessed without Approval
  • else Blank ("")

My problem is that I want to show only the rows (Employees) where I have data. All the traditional filter methods I can think of result in the filter being applied to the first date column. So if I have data in the second date it dissapears.

tharford_0-1593685921312.png

tharford_1-1593686266001.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Filtering out 'blank' results in a Matrix

I've fixed it! AND I have learned an important lesson!

"" is not blank!

So I have replaced the "" at the end of my nested if statement with BLANK() and my filter expression works as intended. I can now concentrate on finishing the conditional formatting issues

Access Status =
IF (
    [ComplianceSiteAccesses] = "Accessed"
        && [ComplianceAccessApproved] = "Approved",
    "#108372",
    IF (
        [ComplianceSiteAccesses] = "Accessed"
            && [ComplianceAccessApproved] = "",
        "#840029",
        IF (
            [ComplianceSiteAccesses] = ""
                && [ComplianceAccessApproved] = "Approved",
            "#ff0018",
            BLANK ()
        )
    )
)

tharford_0-1593704660454.png

 

View solution in original post

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Filtering out 'blank' results in a Matrix

@tharford , your problem is what shown screenshot or conditional formatting



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: Filtering out 'blank' results in a Matrix

@amitchandak

Screenshot #1 shows an unfiltered list.

Screenshot #2 shows when I have applied a filter (the filter in that case is a measure in it's own right - see DAX below):

 

DisplayAccessStatus =
IF (
    [Access Status] = "#ff0018",
    1,
    IF ( [Access Status] = "#108372", 1, IF ( [Access Status] = "#840029", 1, 0 ) )
)

 

 

But I get the same result if I apply a 'Is Not Blank' filter on my Value Measure (for the record that is this DAX):

 

Access Status = 
IF (
    [ComplianceSiteAccesses] = "Accessed"
        && [ComplianceAccessApproved] = "Approved",
    "#108372",
    IF (
        [ComplianceSiteAccesses] = "Accessed"
            && [ComplianceAccessApproved] = "",
        "#840029",
        IF (
            [ComplianceSiteAccesses] = ""
                && [ComplianceAccessApproved] = "Approved",
            "#ff0018",
            ""
        )
    )
)

 

 

My issue is that the filter seems to apply to the first column of the matrix only. I'd like to only filter out when the whole row is blank. See Alexander dissapears from my filtered view (Screenshot #2).

I am very confused, and very close to this data so please let me know if I am not being clear...😁

Highlighted
Frequent Visitor

Re: Filtering out 'blank' results in a Matrix

I've fixed it! AND I have learned an important lesson!

"" is not blank!

So I have replaced the "" at the end of my nested if statement with BLANK() and my filter expression works as intended. I can now concentrate on finishing the conditional formatting issues

Access Status =
IF (
    [ComplianceSiteAccesses] = "Accessed"
        && [ComplianceAccessApproved] = "Approved",
    "#108372",
    IF (
        [ComplianceSiteAccesses] = "Accessed"
            && [ComplianceAccessApproved] = "",
        "#840029",
        IF (
            [ComplianceSiteAccesses] = ""
                && [ComplianceAccessApproved] = "Approved",
            "#ff0018",
            BLANK ()
        )
    )
)

tharford_0-1593704660454.png

 

View solution in original post

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors