Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Switch between tables in a report

Hello to all

 

I have many tables, each from one installation, with hourly data and the same columns. I want to create a filter that allows me in the same report to switch from one plant/table to another. I am a newbie in Power BI and I don't see a human way to do it. I hope someone can help me. Thanks and congratulations for the forum.

 

All tables are related to a single one through the timestamp column

  • Hi, Anonymous 

     

    To switch between tables in a report, you could create a parameter that allows the user to select which table they want to view. The parameter could be a dropdown list of the available tables, and the report would filter the data based on the selected table.

     

    To set this up, you would need to create a new parameter in your report and set its data type to "text". You can then create a calculated field that uses the parameter to filter the data based on the selected table. The calculation could look something like this:

    IF [Selected Table] = "Table 1" THEN [Table 1 Data]
    ELSEIF [Selected Table] = "Table 2" THEN [Table 2 Data]
    ELSEIF [Selected Table] = "Table 3" THEN [Table 3 Data]
    END

     

    Replace "Table 1", "Table 2", and "Table 3" with the names of your actual tables, and replace "[Table 1 Data]", "[Table 2 Data]", and "[Table 3 Data]" with the appropriate data fields from each table.

     

    Once you have set up the parameter and calculation, you can add the parameter to your report and use it to switch between tables.

    Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

     

    Best Regards,

    Community Support Team _Charlotte

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

     

1 Reply

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

     

    To switch between tables in a report, you could create a parameter that allows the user to select which table they want to view. The parameter could be a dropdown list of the available tables, and the report would filter the data based on the selected table.

     

    To set this up, you would need to create a new parameter in your report and set its data type to "text". You can then create a calculated field that uses the parameter to filter the data based on the selected table. The calculation could look something like this:

    IF [Selected Table] = "Table 1" THEN [Table 1 Data]
    ELSEIF [Selected Table] = "Table 2" THEN [Table 2 Data]
    ELSEIF [Selected Table] = "Table 3" THEN [Table 3 Data]
    END

     

    Replace "Table 1", "Table 2", and "Table 3" with the names of your actual tables, and replace "[Table 1 Data]", "[Table 2 Data]", and "[Table 3 Data]" with the appropriate data fields from each table.

     

    Once you have set up the parameter and calculation, you can add the parameter to your report and use it to switch between tables.

    Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

     

    Best Regards,

    Community Support Team _Charlotte

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