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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GGDAC
Helper I
Helper I

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 8
PaulDBrown
Community Champion
Community 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):

Source.JPG

 

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:

 

markets budgets sales model.JPG

 

And finally built this matrix:

 

markets budgets sales result.JPG

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





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






saraMissBI
Resolver I
Resolver I

Hi @GGDAC ,

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

 

Thank you

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  

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:

snap.png

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

Hi Sara

My model is like this. I have three markets sales details in matrix and not table

 

Budget Vs Actual by markets by products

Item

Germany

 Budget

Germany

Actual

Fraance

Budget

France

Actual

Denmak

Budget

Denmark

Actuals

Total

Budget

Total

Actual

Shoes10070150120200250450440
Electronics5060707010080220210
Total150130220190300330670650

@GGDAC 

I created the tables and the matrix as you mentioned, and then created two measures. Hope this is what you are looking for.
total actual and budget.JPG

 

 

 

Total Actual = CALCULATE(SUM(Denmark[Actual])) + CALCULATE(SUM(France[Actual]))+ CALCULATE(SUM(Germany[Actual]))
Total Budget = CALCULATE(SUM(Denmark[Budget])) + CALCULATE(SUM(France[Budget]))+ CALCULATE(SUM(Germany[Budget]))

 

 

PBIX:
https://qiuyunus-my.sharepoint.com/:u:/g/personal/paul_qiuyunus_onmicrosoft_com/EesC7JUQ8oNMkXnLUznm...

 

Paul

 

Dear Paul

Thank you for reply and solution

I tried the measure but it is not working. It gives me error that "Coumn "Actual" in the table can not be found or in may not be used in this expression"

Also i saw you have attached the file but your report is just with three matrix with budget and actuals. The main is creating the measure which is not there in your PBI report though you have give the formual / measure but you have not used in your report

Your report is simply three matrix but not total of all three actuals

 

Kind regards

Ali

@GGDAC 

Sorry for that, it seems something went wrong that my measures were not show up. I put the measures in the Denmark table.
https://qiuyunus-my.sharepoint.com/:u:/g/personal/paul_qiuyunus_onmicrosoft_com/EesC7JUQ8oNMkXnLUznm... 


The error can be because the table relationship in my sample are different to yours. If you want the absolute solution, I think you could provide a sample pbix.  


Best,
Paul

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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