Forum Discussion

GGDAC's avatar
GGDAC
Icon for Helper I rankHelper I
6 years ago

Sum measure with attributes

I need help

I have three different tables having common attributes and now i want to create measure summing up all three values from three tables. Below is sample example

 

 

Examples

Table - Germany                                    Table -  France                                                          Table - Denmakr

Attribute 1       Attribute 2              Attrubute 1                 Attrubute 2                   Attribute 1                        Attribute2                     New Measure

Budget              Actual                         Budget                             Actual                               Budget                                   Actaul                          Total Acutal

500                    400                              300                                   300                                         200                                     150                                    850

8 Replies

  • Hi GGDAC ,

    Could you please report your result table?...it is not clear enough

     

    Thank you

    • GGDAC's avatar
      GGDAC
      Icon for Helper I rankHelper I

      Hi Sara

      Thank you for your reply.

      Basically i have three matrix i.e, Sale 1  2 and 3 with attributes Budget and Actual

      Now I want to make total of both atrubutes separately as shown in below table

      I tried measure with sum but it totals both attribute together though i want budget and actual sepeately

      Hope I made little more clearer

       

      Sales 1 Sales 2 Sales 3 Total   
      BudgetActualBudgetActualBudgetActualBudgetActual  
      100702002505040350360  
      • saraMissBI's avatar
        saraMissBI
        Icon for Resolver I rankResolver I

        Hi GGDAC ,

        Thank you for the details you provided. Computing totals by attribute (Budget, Actual) is automatically done by PowerBI if your data is put together in one table. Please have a look at the snapshot below:

        Do you want to have the result in the exact layout your provided in your last post? if yes, could you please provide more details about your model? 

         

        Thank you

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    GGDAC 

    Good evening,

     

    See if this works for you. I've assumed your source resembles this (if the source data has a different structure, please provide an example):

     

    I imported this into PBI, did some transformations in Power Query, involving splitting the tables into two (budget and actuals) and unpivotting. The resulting model looks like this:

     

     

    And finally built this matrix:

     

    Here is a link to the file if you're interested: PBIX file