Forum Discussion

robertokzl's avatar
robertokzl
Frequent Visitor
6 years ago
Solved

Union and sum two tables

Hello all,  I'm try to create a table on Power BI to sum values os 2 different position according company name.  I create 2 querys, one for Passenger Car and other for Light Comertial Vehicles that...
  • dedelman_clng's avatar
    6 years ago

    Hello @robertokzl -

    First, check out this post on the best details to give when presenting your How-Get-Your-Question-Answer issue-Quickly

    That said, it looks like you need to put your company name (Ford, GM, etc.) and product line (Dodge, Chrysler, etc.) into dimension tables. You can do this outside of PowerBI (depending on where/how your data is stored), or you can dynamically calculate it within PowerBI:

    Company = DISTINCT ( DataTable[Company] )
    
    Product = SUMMARIZE ( DataTable[Company], DataTable[Product] )

    Create the relationships, and then use the Company columns for the visual table instead of the Company value in the data table. This should allow you to display a summary of all your company-wide data.

    If this solution doesn't work for you, review the link above and respond with more details about what you have and what you're trying to do.

    I hope this helps.

    David