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

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

Reply
Alfista1997
Frequent Visitor

DAX Calculated Column Sum with Two Categories

I'm trying to create a column in table 1, that refrences table 2 and sum the values in Column 1 for each ID and Year-Month and divide that by the sum of values in Column 2 for each ID and Year-Month and have that result populate into my other table. 

 

If I've got 2 IDs 17964 and 54008 with a table like this, but there's a lot more columns of course. Then Table 2 looks like below, there is no data for 17964, so techically it should return blank/0. The new column in table one should return 0 and 0 for 17964, and 282% and 266% for 54008 for each of their respective yr-month and id.

 

Table 1

IDYear-Month
17964202306
17964202305
54008202306
54008202305

Screenshot 2023-08-31 111751.jpg

 

Table 2

  Yr-M        ID        Colm. 1     Colm. 2       Ignore/DateField

2023055400831007.455513.61Monday, May 1, 2023
2023055400816819.557053.2Monday, May 1, 2023
2023055400804375.85Monday, May 1, 2023
2023065400831007.455719.69Thursday, June 1, 2023
2023065400816819.557135.67Thursday, June 1, 2023
2023065400805115.12Thursday, June 1, 2023

 

Table 1.jpg

1 REPLY 1
amitchandak
Super User
Super User

@Alfista1997 , to create a column in table using another table

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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