Forum Discussion

iamiram's avatar
iamiram
Regular Visitor
3 years ago
Solved

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 ...
  • jgeddes's avatar
    3 years ago

    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.

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

    You should now have...

    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...


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