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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
iamiram
Regular Visitor

Filter blank rows from table with field parameter

I have a table with lots of blank values. I'm using a field parameter to let the user chose which columns to show in a table visual. I'd like the visual to filter out rows with a blank value for the selected column(s).

 

For example:

NAMECOLORSHAPESIZE
appleredroundmedium
bananayellow  
cherry  small
durian spiky 
elderberry   
figpurple small

 

If the user slects COLOR and SHAPE in the field parameter slicer, the table visual should be:

NAMECOLORSHAPE
appleredround
bananayellow 
durian spiky
figpurple 

 

I'm still a relatviely new Power BI user, so any ideas would be appreciated.

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

There are likely a few different ways to do this but I would generally approach it like this...

I would 'unpivot' your table in the Power Query editor.

jgeddes_0-1671657853682.png

Select 'NAME' column and select Transform->Unpivot Columns->Unpivot Other Columns

jgeddes_1-1671657909065.png

You should now have...

jgeddes_2-1671657937825.png

Close and Apply to return to the BI screen.

You can create a measure to return the minimum non-blank value.

Value (not Blank) = 
//create a virtual table that has no blank 'values'
var _vtable =
FILTER(fruitTable, fruitTable[Value] <> "")
return
//return the minimum value from the virtual table
MINX(_vtable, fruitTable[Value])

You can now build the matrix visual with Rows = [NAME], Columns = [Attribute] and Values = [Value (not blank)]

to get...

jgeddes_3-1671658178037.png


You can use the 'Attribute' column as slicer for the user to select which attributes they want displayed.

jgeddes_4-1671658202711.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
jgeddes
Super User
Super User

There are likely a few different ways to do this but I would generally approach it like this...

I would 'unpivot' your table in the Power Query editor.

jgeddes_0-1671657853682.png

Select 'NAME' column and select Transform->Unpivot Columns->Unpivot Other Columns

jgeddes_1-1671657909065.png

You should now have...

jgeddes_2-1671657937825.png

Close and Apply to return to the BI screen.

You can create a measure to return the minimum non-blank value.

Value (not Blank) = 
//create a virtual table that has no blank 'values'
var _vtable =
FILTER(fruitTable, fruitTable[Value] <> "")
return
//return the minimum value from the virtual table
MINX(_vtable, fruitTable[Value])

You can now build the matrix visual with Rows = [NAME], Columns = [Attribute] and Values = [Value (not blank)]

to get...

jgeddes_3-1671658178037.png


You can use the 'Attribute' column as slicer for the user to select which attributes they want displayed.

jgeddes_4-1671658202711.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you so much! This works and was easy to follow.

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