Forum Discussion

Peter_23's avatar
Peter_23
Icon for Advocate V rankAdvocate V
2 years ago
Solved

Filtrado entre dos objetos visuales

Buen dia, tengo una consulta:  tengo una consulta con dos visualizes una grafico y una tabla, el modelo de datos se puede ver que el producto pc solo se tiene el id_tienda 2, asi que cuando realizo c...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Peter_23 ,

     

    According to your statement, I think the table visual and column chart are both create based on same table with different filters. In table visual you use filter tipo = 3 and in column chart you use filter tipo = 1 or 2.

    As far as I know, it is not a good idea to filter your table visual by 'pc' in your column chart. The row filter in your data table will impact your result. So when you click on 'pc' in column chart, the table visual will return blank.

    Here I suggest you to create an unrelated Dimproducto table to achieve your goal.

     

    Dimproducto = VALUES('Table'[producto])

     

    Measure:

     

    MEASURE =
    VAR _Idtable =
        CALCULATETABLE (
            VALUES ( 'Table'[Id_tienda] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[producto] IN VALUES ( Dimproducto[producto] )
            )
        )
    RETURN
        IF ( MAX ( 'Table'[Id_tienda] ) IN _Idtable, 1, 0 )

     

    Add this measure into visual level filter of table visual and set it show items when value = 1.Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.