Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Power BI

Hello,
I have 5 tables in Power BI. Every table have similar Column names and same number of Columns. 

 

Now, I want to create  2 dropdowns to select any two  tables.

After selecting two tables from dropdowns., I want to show table1 v/s table2, i.e bar chart between column 1 and column2 from TableX v/s bar chart between column 1 and column 2 from TableY.

Basically I want to compare data between two tables and it should be side by side.

 

Thankyou for inputs in advance.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

Believe that the best way is to append all tables together in a single table with a column identifying the name of the table that way you will have a column to use has you slicer and also has a legend on your visualizations and the comparision will be imediate no need to have additional measures or filters.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Anonymous,

I agree with MFelix's point of view, it should more suitable than your mentions.

You only need to use union functions to merge these tables. Then you can use the merge table to create visuals and use the 'remark table' field on the visual level filter to filter table records.

Merge =
UNION (
    ADDCOLUMNS ( Table1, "Remark", "T1" ),
    ADDCOLUMNS ( Table2, "Remark", "T2" ),
    ADDCOLUMNS ( Table3, "Remark", "T3" ),
    ADDCOLUMNS ( Table4, "Remark", "T4" )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
MFelix
Super User
Super User

Hi @Anonymous ,

 

Believe that the best way is to append all tables together in a single table with a column identifying the name of the table that way you will have a column to use has you slicer and also has a legend on your visualizations and the comparision will be imediate no need to have additional measures or filters.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.