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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Compare two columns form different Table

Hi ,
I have two different tables table1 has category and table 2 has category and sub category In Power BI, I want the result to be shown in as
1.compare sales and qty column as category and subCategory in one column (i.e. in output image I have created 2 different column chart I want it as one )how can I get it by DAX
2.category name should come first(from left) on axis
sharing some images for better understanding

Prajakta11_0-1657634610668.png

 

Prajakta11_2-1657634670160.png

Prajakta11_4-1657634757716.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

 I did a test using similar data to yours, and I wonder if this is what you are trying to achieve?

vmengzhumsft_0-1657879126145.png

Compare their respective sales and QTY with category  and sub-category as X-axis?

 

Best regards,

Community Support Team Selina zhu

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

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

HIi @Anonymous , I am wondering why you need to the two tables in the data model.  The Sub-Category contains all the data need to create the two visuals you have shown.  If you are trying to add a reconciliation between the two tables, I would recommend using Power Query to compare the two tables.  If there is an issue, then report this exception in Power BI.

If you want to compare using DAX, you will need to create Bridging Tables for Date and Category.  These tables can then be joined to both tables.  When they are joined, these table will apply filters to both tables.  You will be able to compare the Sum of table 1 to Sum of table 2, and calculate a difference.  Please watch the following GuyInACube video to understand this:  Handling MULTIPLE fact tables in Power BI - YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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