Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Create table that take value selected

Hello, 

 

I would like to create a table (not a visual but a real table) that take values that are selected in each segment in my power bi. I would like to have something that is interactive depending on values I select in my segments. For example, I have a Segment "A" with "1", "2", "3" as different values in this segment. I select the value "2" in this segment and I would like to see in the table I create a colomn called "A" with the value "2" under (if I changed my selection it has to change also in the table"). The values are in text format in reality just for information.

 

Thank you very much in advance for your help, 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Thanks for the reply from bhanu_gautam , please allow me to provide another insight:

    Hi, Anonymous 

    Thanks for letting us know your user experience.  According to your case description, I do understand how frustrated you are now.
     

    Based on our current understanding of your needs, as you have measured, it is not possible to create a new computed table based on the values of the original table slicer. There are two main reasons for this:

     

    1.Unable to capture values for dynamic slicers: In a calculated table, you can't directly capture the values of another dynamic slicer.

     

    2.Recursion and cyclic dependency risks: Even if it can be implemented, this approach can easily lead to recursion, which can lead to the problem of circular dependency.
     

    So, my alternative is:
     

    First, copy the query to the data source directly in PowerQuery, and then modify the table according to your needs:
     

     

    Using the Queries pane - Power Query | Microsoft Learn

    Then, the table relationship is established in the desktop, so that the interaction between the two tables is realized:

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

    Of course, if you have any new ideas, you are welcome to contact us.
     

    Best Regards,

    Leroy Lu

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

3 Replies

  • Anonymous , You can try below mentioned steps

     

    Create a Slicer:

    Add a slicer to your Power BI report.
    Drag the field you want to use for filtering (e.g., "A") into the slicer.
    Create a Calculated Table:

    Go to the "Modeling" tab and select "New Table."
    Use the following DAX formula to create a calculated table that reflects the selected values in the slicer:
    SelectedValuesTable =
    VAR SelectedValues = VALUES(TableName[A])
    RETURN
    SELECTCOLUMNS(
    SelectedValues,
    "A", [A]
    )
    Replace TableName with the actual name of your table and A with the actual name of your column.
    Add the Calculated Table to a Table Visual:

    Add a table visual to your report.
    Drag the field "A" from the SelectedValuesTable into the table visual.
    Test the Interactivity:

    Select different values in the slicer and observe how the table visual updates to reflect the selected values.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello, 

       

      Thank you for your proposition but this doesn't work because to have the interactivity you need to create a visual table in the power bi. I would like to have the interactivity directly in the "Table display" on the left of the screen. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thanks for the reply from bhanu_gautam , please allow me to provide another insight:

        Hi, Anonymous 

        Thanks for letting us know your user experience.  According to your case description, I do understand how frustrated you are now.
         

        Based on our current understanding of your needs, as you have measured, it is not possible to create a new computed table based on the values of the original table slicer. There are two main reasons for this:

         

        1.Unable to capture values for dynamic slicers: In a calculated table, you can't directly capture the values of another dynamic slicer.

         

        2.Recursion and cyclic dependency risks: Even if it can be implemented, this approach can easily lead to recursion, which can lead to the problem of circular dependency.
         

        So, my alternative is:
         

        First, copy the query to the data source directly in PowerQuery, and then modify the table according to your needs:
         

         

        Using the Queries pane - Power Query | Microsoft Learn

        Then, the table relationship is established in the desktop, so that the interaction between the two tables is realized:

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

        Of course, if you have any new ideas, you are welcome to contact us.
         

        Best Regards,

        Leroy Lu

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