Forum Discussion

scorrera's avatar
scorrera
Regular Visitor
2 years ago
Solved

Combing Tables in PowerBI

I'm sorry if I don't articulate this well.   Overall I'm looking to create a visual that can compare budgeted amounts versus what was actually spent in a center-account on a monthly basis.   Curr...
  • audreygerred's avatar
    2 years ago

    Hi! You're going to want to set your model up as a star schema so that you have fact and dimension tables. In this way you can have your actuals table and your budget table in as facts, and a date table that is the dimension. It would be joined to each fact table and that allows you to utilize the facts together in a visual through the join to the dimension (i.e. join facts with dimension, not fact to fact). You'll also need a dimension table for Center-Account which would also join to both facts. Then, in the visual you would pull in Center-Account from your dimension table, you month from a date table, and the actual and budget would be measures based on the fact tables. Here are two blogs posts I have about star schema and a great table I love: http://powerbiwithme.com/2023/07/30/the-star-schema-edition/ and  http://powerbiwithme.com/2023/08/01/the-custom-date-table-edition/ 

  • Daniel29195's avatar
    2 years ago

    scorrera 

     

    for your budgeted table , go to power query and unpivot the table 

     

    this way you will have the month on the rows and per each row th budget ,

     

     

     

    now you can link your dimdate table ( assuming you have one.  if not, i recommened that you create one ) , 

    to both tables. 

     

    and then you just need to drag and drop the columns from the tables to the visual : 

    dates from dimdate, 

    actual spend from the first table , and budget amount from the budget_amount_table .

     

     

     

    scorrera  let me know if this works for you .

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠