Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Return records by slicer selection

Hello All, I have a table in my power bi desktop that has blank values in my id column(see below).I have a name slicer in my report. Now what i want is to return all the records have the same id as ...
  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi Anonymous ,

     

    To create a calcualted table.

     

    Filter = VALUES(Table1[name])

    Then we can create a measure as below and make the table visual filtered by the measure.

     

    Measure = var selename = SELECTEDVALUE('Filter'[name])
    var sameid = 
    CALCULATE(MAX(Table1[id]),FILTER(ALL(Table1),Table1[name]=selename))
    return
    IF(MAX(Table1[id]) = BLANK() || MAX(Table1[id])=sameid,1,0)

     

     

    Regards,

    Frank