Forum Discussion

XAVICHETAPIA's avatar
XAVICHETAPIA
Frequent Visitor
4 years ago
Solved

Filtering table by Duplicated ReservationNumber

Dear,   I'm trying a simple measure but first I need to know how to filter a table. In the table each "NumReservation" has many rows, all with the same "Lead" value.   TABLE:   I wou...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, XAVICHETAPIA 

    You need create a column with a unique index in ‘Transform Data’  first.

    (The column 'KPI'[indice] in the example you provided seems to contain duplicate values.)

    Then you can create measure like:

    Measure =
    VAR min_indice =
        CALCULATE ( MIN ( 'KPI'[indice] ), ALLEXCEPT ( 'KPI', 'KPI'[NumReserva] ) )
    RETURN
        IF ( SELECTEDVALUE ( 'KPI'[indice] ) = min_indice, 1, 0 )

    And drag this measure to visual filter pane to filter data as below:

    Best Regards,
    Community Support Team _ Eason