Forum Discussion

Peter_23's avatar
Peter_23
Advocate 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 clic en la grafica me gustaria que filtrara la tabla ejemplo clic en PC solo debe mostrar el marker con  cantidad 5, pero al tratar de filtrar no se muestra nada porque lo que entiendo tiene diferentes filtros los visuales la tabla tipo 3 y la grafica tipo 2, ¿existe alguna manera de lograr ese filtrado dinamico? 

 

 

 

Gracias.

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

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

     

  • thanks Anonymous  I resolved with another solution, but you give me a hit, I  use an unrelated table. :)