Forum Discussion

Pbiuserr's avatar
Pbiuserr
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Dynamic X-axis chart does not filter other visuals

Hello, 
I've created a bar chart where I can switch X-axis category. The connections looks like down below.

Basicaly i took dimensions from PersAndJob (fact table) and stored it in brand new table and then merged all of the tables in Selection Breakdown (so basically I have entries from all of the tables along with their "Metric" type as index). All of the separated table are connected to fact table Then created a chart and took "Metric" from "Selection breakdown" table as axis as well as slicer with same dimension. The chart itself works perfect, however If I choose any entry from chart it doesnt filter other visuals. From my perspective, it looks good connection - wise but perhaps it is not. Any ideas how to make it interactive with other visuals?

  • Pbiuserr's avatar
    Pbiuserr
    4 years ago

    Hi,
    Thanks but I resolved my problem 🙂
    1. Created index table on my fact table
    2. Duplicated fact table, removed columns which would not be used in dynamic x axis
    3. Unpivoted remained columns (excluded index)
    4. Loaded query into data model. Connection between fact table and unpivoted fact table on index column has been created

    5. Changed the connection to bi-directional (i know its risky but i'd use it only on this particular chart and never touch again the unpivot table so i guess its safe, isnt it?)

    6. Create slicer from "Attribute" column from unpivoted fact table

    7. Create chart with axis of "Value" column from unpivoted fact table. 

    Works like charm! Dimensions switches, clicking on category filters entire dashboard page!

6 Replies

  • Please provide more details. Which tables feed these other visuals?

    • Pbiuserr's avatar
      Pbiuserr
      Icon for Post Prodigy rankPost Prodigy

      Other visuals are from PersAndJob table as well. It's main table

       

      I've created a bar chart with 4 dynamic axis based on slicer selection (Department, Emp class, Job family, Position Title). All of these columns are stored in main table (PersAndJob). The chart works itself, axises are changing, but clicking on certain category like Department 1 from department chart doesnt filter other visuals (also feed from PersAndJob columns)

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pbiuserr ,

     

    Does the x-axis of the visual originate from this table? 

    If so, these relationships include both inactive and unclear relationships that PBI does not like when querying the data, which can cause some inexplicable errors.

    Please try to get advice from the documentation and make some improvements to the model to make it work better.

    Create and manage relationships in Power BI Desktop - Power BI | Microsoft Docs

    Active vs inactive relationship guidance - Power BI | Microsoft Docs

     

    Best Regards,

    Gao
    Community Support Team 

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

    • Pbiuserr's avatar
      Pbiuserr
      Icon for Post Prodigy rankPost Prodigy

      Yes, the axis is from selection breakdown. I can't activate all of the relationships because of ambiguity, pbi advises then to get rid of Selection Breakdown and JobAndPers connection, which will lead to same output

       

      Is there any other way to create dynamic x-axis chart based on slicer selection?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Pbiuserr 

         

        Please refer to this article below, hope it can help you.

        Dynamic X axis on charts - Power BI - RADACAD

         

        Best Regards,

        Gao
        Community Support Team 

         

        If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!