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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
_chris_
Helper III
Helper III

Simple DAX issue

Hi,

 

I have 2 tables:

 

1. DIM table: CostCenters

  -Id

 

2. FACT Table: Revenue

  -OriginalId

  -NewId

  -Amount

 

There is a relation between CostCenters.Id and Revenue.NewId and I can easyily calculate the "Sum of Amount" of CostCenter.NewId.

 

However, I need a measure that gives me the "Sum of Amount" for the CostCenter.OriginalId.

 

I tried many things but nothing works 😞

 

Any help would really be appreciated.

 

Thx Christian

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @_chris_ ,

 

If I understand your question correctly then you need follow below steps:-

1. Create a inactive relationship between CostCenters.Id and Revenue.OriginalId

2. Create a measur as below:-

 

measure_ =
CALCULATE (
    SUM ( Revenue[Amount] ),
    USERELATIONSHIP ( CostCenters[Id], Revenue[OriginalId] )
)

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
_chris_
Helper III
Helper III

Thank you very much, Samarth!

 

I had in mind that it is possible to solve problems like this with an inactive relationsship. However, I did not know how to do this exactly.

 

On the other hand (as I am coming from SQL) where you can just join tables together without the need to add something to the (not existing) model, I am wondering if there is a way to achieve this w/o the need to create a relationship beforehand?

 

Anyway, I will accept your solution!

 

BR Christian

@_chris_, this is preferred way to achieve it. Rest of the thing depend upon your model and data.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Samarth_18
Community Champion
Community Champion

Hi @_chris_ ,

 

If I understand your question correctly then you need follow below steps:-

1. Create a inactive relationship between CostCenters.Id and Revenue.OriginalId

2. Create a measur as below:-

 

measure_ =
CALCULATE (
    SUM ( Revenue[Amount] ),
    USERELATIONSHIP ( CostCenters[Id], Revenue[OriginalId] )
)

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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