Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create New Filter With OR option between to columns

Hi Gurus,  I'm New with power bi and I have an issue with filtering a Table.  I want the user to be able to filter de report like this.    Select Fields from Table t where t.Date1 = "Date selec...
  • v-easonf-msft's avatar
    4 years ago

    Hi, Anonymous 

    Please make the following changes in your original pbix:

    1.create seperate tables for field 'FECHA_VCTO1_C1' and field ‘FECHA VCTO1_C2 

    calculated table:

    slicer1 = VALUES('Table'[FECHA_VCTO1-C1])
    slicer2 = VALUES('Table'[FECHA_VCTO1-C2])

    2. add a measure as below and apply it to visual filter pane

    filter = 
    VAR condition1 =
        IF (
            MAX ( 'Table'[FECHA_VCTO1-C1] ) = SELECTEDVALUE ( 'slicer1'[FECHA_VCTO1-C1] ),
            1,
            0
        )
    VAR condition2 =
        IF (
            MAX ( 'Table'[FECHA_VCTO1-C2] ) = SELECTEDVALUE ( 'slicer2'[FECHA_VCTO1-C2] ),
            1,
            0
        )
    RETURN
        IF ( condition1 + condition2 > 0, 1, 0 )

    Best Regards,
    Community Support Team _ Eason