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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
non23
Helper I
Helper I

Remove blank when Parameter is selected

Hey guys,

 

I need your wisdom with a matrix visualization where I have used a parameter to control the rows, allowing users to select their desired view. My goal is to hide rows that contain "Blank Approver" values when Approver Parameter is selected.

 

Here’s the issue:

  • The "Blank Approver" rows represent rejected items, which should not be displayed if the user selects an "Approved" type.
  • The challenge is that the "Blank Approver" rows should not be shown regardless of the selected type (Approved or Rejected) when the parameter is applied.

I have attached an image to illustrate how the matrix should look when both the parameter and type are selected (as an ideal scenario). Is there a way to achieve this behavior where the "Blank Approver" rows are completely hidden when only the parameter is selected?

 

Parameter selected

Screenshot 2025-01-10 063504.png
Parameter and Type is selected

Screenshot 2025-01-10 063928.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @non23

 

Please check the following mesuare:

ShowRows = 
VAR SelectedField = SELECTEDVALUE(Parameter[Parameter Fields]) 
RETURN
SWITCH(
    TRUE(),
    SelectedField = NAMEOF('MainTable'[Approver]) && SELECTEDVALUE('MainTable'[Approver]) = "Blank", 0,
    SelectedField = NAMEOF('MainTable'[Rejected by]) && SELECTEDVALUE('MainTable'[Rejected by]) = "Blank", 0,
    SelectedField = NAMEOF('MainTable'[Created by]) && SELECTEDVALUE('MainTable'[Created by]) = "Blank", 0,
    1
)

 Then filter the visual with ShowRows=1 to remove Blank value:

vyajiewanmsft_0-1736497198787.png

Result for your reference:

vyajiewanmsft_2-1736497288824.png

vyajiewanmsft_3-1736497308603.png

Best regards,

Joyce

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
non23
Helper I
Helper I

I have managed to find a partial solution by following this link.

Unfortunately, I'm having issues with the Total as it's giving total of everything instead of the displayed values only. 

Any help on the total issue would be appreciated!

Anonymous
Not applicable

Hi @non23

 

Please check the following mesuare:

ShowRows = 
VAR SelectedField = SELECTEDVALUE(Parameter[Parameter Fields]) 
RETURN
SWITCH(
    TRUE(),
    SelectedField = NAMEOF('MainTable'[Approver]) && SELECTEDVALUE('MainTable'[Approver]) = "Blank", 0,
    SelectedField = NAMEOF('MainTable'[Rejected by]) && SELECTEDVALUE('MainTable'[Rejected by]) = "Blank", 0,
    SelectedField = NAMEOF('MainTable'[Created by]) && SELECTEDVALUE('MainTable'[Created by]) = "Blank", 0,
    1
)

 Then filter the visual with ShowRows=1 to remove Blank value:

vyajiewanmsft_0-1736497198787.png

Result for your reference:

vyajiewanmsft_2-1736497288824.png

vyajiewanmsft_3-1736497308603.png

Best regards,

Joyce

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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