Forum Discussion

Tubster66's avatar
Tubster66
Regular Visitor
8 years ago
Solved

Merging Two Tables

Hi

 

New to Power BI and struggling with a basic problem. I have chased my tail on various solutions posted but none work for me (probably due to my lack of ability!!)

 

Budget and Actuals summary sales tables are identical in having four columns, NAME, MONTH, YEAR, VALUE. As I have seen in other posts some people have a budget but no actuals for certain month/year combinations and likewise we have new people with sales, but no budget.

 

In the end I want a 5 column table of NAME MONTH YEAR ACTUAL BUDGET, with a row for each unique NAME/PERIOD/YEAR combination across both Budget and Actual tables. The Actuals Table is a "New Table" using SUMMARIZE measure analysing data from another larger and more detailed table. I have linked both the budget and actual tables via other date / data tables so in theory they are linked.

 

Looked at just doing this as a data load from a Progress database, or concatentating NAME PERIOD YEAR and then merging the two tables (but that creates ambiguity). Neither appear to work so..............................

 

Any help will be much appreciated

 

 

 

 

  • I guess you already have date dimension in your data model, if you not then you need one.

     

    - add date column in your actual and budget table, you can create it from month/year column.

    - set relationship on date from your actual/budge table to date dimension.

     

    now in your table visual, if you bring year/month/date from your date dimension and bring value from actual and budget column, you will get actual vs budget where applicable.

     

    I hope it is helpful, if you need further assistance, please reply.

     

    Thanks,

     

     

3 Replies

  • I guess you already have date dimension in your data model, if you not then you need one.

     

    - add date column in your actual and budget table, you can create it from month/year column.

    - set relationship on date from your actual/budge table to date dimension.

     

    now in your table visual, if you bring year/month/date from your date dimension and bring value from actual and budget column, you will get actual vs budget where applicable.

     

    I hope it is helpful, if you need further assistance, please reply.

     

    Thanks,

     

     

    • Tubster66's avatar
      Tubster66
      Regular Visitor

      Thank you!

       

      Rookie error on the Date Dimension Table - got what I need and also fixed a problem I was having on seeing records in a matrix when I had a column set to "see items with no data".

       

      Two for one - great result.

       

      Thanks again.