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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Sum together values from multiple tables based on unique ID

Hello,

 

I have been generating a monthly report that has two columns "AssetID" and "DaysOnline". The AssetID is a unique identifier used across several tables to denote a device, while days online is how many days an asset communicated for a specific month. At the moment I have 10 reports, each in a different table. Example format below.

 

Asset ID

DaysOnline

ABC

10

XYZ

15

 

I have a master table for all assets that are registered and I would like to create a new column in this table that adds together the days online for each asset from the monthly reports. For example, if asset ABC was online for 10 days in January, 15 in February, and 10 in March, the new column would list ABC as having 35 days online and do the same for each asset in the list. Example format for master file below.

 

Asset ID

Asset Type

Registration Date

DaysOnline

ABC

A

1/1/2020

35

XYZ

B

2/1/2020

27

 

I know I could do something similar in excel with index and match functions, but I am new to DAX and need help figuring out how to do this.

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you have ten different tables to store monthly data, and a master table contains all the asset IDs.

Try using append queries in the query editor.

Create a one to many relationship between the master table and the append table.

Sample .pbix 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you have ten different tables to store monthly data, and a master table contains all the asset IDs.

Try using append queries in the query editor.

Create a one to many relationship between the master table and the append table.

Sample .pbix 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@Anonymous 

If your Master Asset Table has a relationship with other tables, you can add a column like

Day on Line = 
sumx( RELATEDTABLE(TABLE1), TABLE1[DAYS] ) +  sumx( RELATEDTABLE(TABLE2), TABLE2[DAYS] ) + so on til 10.

I suggest you should append (combine all those tables to one for better modeling)

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors