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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Sum a single value in a visual report with a Total Value

Hi Everyone

I'm very new in Power BI and I'm trying to learn DAX but I still have some basic issues

 

I have the following scenario:

- Table A with a list of Admissions Freight cost. (The freight cost is a single value for the whole admission)

- Table B all the batches for the Admissions

- Table C is the transactional table

 

How I can Sum Freight cost to Total Cost in the visual report?

 

Table A 
AdmissionsFreight  Cost
ADM01800
ADM02300
ADM035000

 

Table B 
AdmissionsBatch
ADM01Batch1
ADM01Batch2
ADM01Batch3

 

Table C   
KeyProdBatchCost
TableKeyProduct1Batch11000
TableKeyProduct1Batch15000
TableKeyProduct1Batch14000

 

Visual Table  
AdmissionFreight Cost from Table ATotal Cost (Sum of Transaction for ADM) Table BTotal + Freight
ADM018001000010800
ADM0230050005300
ADM0350001500020000

 

Regards

JADG

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

Make the following relationships:

  • Table A [Admissions] (1) -> Table B [Admissions] (Many)
  • Table B [Batch] (1) -> Table C [Batch] (Many)

Then create the following measure:

 

Total + Freight = SUM(TableA[Freight  Cost])  +SUM(TableC[Cost])

Now make you table with the following  setup:

 

  • TableA[Admissions]
  • TableA[Freigth Costs]
  • TableC[Cost]
  • [Total+Freight]

Check the result on the PBIX file attach.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

Make the following relationships:

  • Table A [Admissions] (1) -> Table B [Admissions] (Many)
  • Table B [Batch] (1) -> Table C [Batch] (Many)

Then create the following measure:

 

Total + Freight = SUM(TableA[Freight  Cost])  +SUM(TableC[Cost])

Now make you table with the following  setup:

 

  • TableA[Admissions]
  • TableA[Freigth Costs]
  • TableC[Cost]
  • [Total+Freight]

Check the result on the PBIX file attach.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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