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
Dellis81
Continued Contributor
Continued Contributor

Referencing table to itself w/simple sum measures

Hello - this is a DAX question.

 

The am needing to find a way of summing values where the dimension table (Center) is referenced back to itself.  

The "CenterSetup" table is compriced of two columns - Center & Allocation.  The Allocation field will eventually be a slicer.   I do not believe this is a parent child issue - as their is no correlation of centers in the setup.

 

Center Table (primary)

Center                    Allocation

Labor1Labor
Labor2Labor
Resource1Resource
Resource2Resource
Activity1Activity
Activity2Activity
WidgetA 
WidgetB 

 

This same table was duplicated, and named SourceCenter.   Allocation column was removed

SourceCenter (secondary center)

Labor1
Labor2
Resource1
Resource2
Activity1
Activity2

 

 

The data table is setup that the Source center provides x number of units to the Target Center. 

For example, row 1, labor 1 provides 5 units (hours) of service to Resource1.

DATA TABLE

SourceCenter        TargetCenter         CDU

Labor1Resource15
Labor1Activity23
Labor2Activity12
Resource1Activity110
Resource2Activity215
Activity1WidgetA5
Activity2WidgetA30

 

The Table relationships

CenterSetup ->Data[TargetCenter]

SourceCenter ->Data[SourceCenter]

Final desired result is a matrix showing for each Center, the number of Target units consumed, and then total number of units tied back to the Source Center.   In the top row -Labor 1 -> 8 total units provided.

For Resource1 - 10 units provided, but consuming 5 units Labor1

 

DESIRED RESULT

 

   
CenterSourceCenterTargetCDUSourceCDU
Labor1  8
Labor2  2
Resource1  10
 Labor1510
Resource2  15
Activity1  5
 Labor225
 Resource1105
Activity2  30
 Labor1330
 Resource21530

 

 

I am able to accomplish the target CDU column, but the Source CDU is proving difficult!

 

 

 

1 ACCEPTED SOLUTION
CheenuSing
Community Champion
Community Champion

Hi @Dellis81 

 

Can you upload sampledata, pbix and output expected to Google/One Drive and share the link here to find a solution.

Cheers

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
CheenuSing
Community Champion
Community Champion

Hi @Dellis81 

 

Can you upload sampledata, pbix and output expected to Google/One Drive and share the link here to find a solution.

Cheers

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Dellis81
Continued Contributor
Continued Contributor

Thank you!   I was looking for a way to attach more detail in my original submission.  Didn't think about filesharing...

 
Hopefully this link will take you to a zip file, containining excel and pbix.   The excel file, has a tab with data tables and expected result.   I attempted to color code the Target CDU's that match up with the SourceCDU.    I sure hope this can be done - if so, this will be a big breakthru for me!
 
thank you!
Dellis81
Continued Contributor
Continued Contributor

I believe I have this resolved..  Finally

Hi @Dellis81 ,

 

Glad to knoow you have resolved the issue. 

 

Can you share the solution in the forum for the benefit of the community.

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

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.