Forum Discussion

JakobSt's avatar
JakobSt
Regular Visitor
1 year ago
Solved

Add one rows value to two rows

Hello, 

 

I'm trying to find a solution for the following Problem: I have a table and for each month I'm trying to add 50 % of the value of Cost Center 912 to 900 and 50% to 901. I would like to do this with a new measured column. Is that possible? 

 

MonthCost CenterBalance
Jan

900

100
Jan 901100
Jan912200
Feb900100
Feb901100
Feb912100

 

MonthCost CenterBalanceSplitBalance
Jan

900

100200
Jan 901100200
Jan912200200
Feb900100150
Feb901100150
Feb912100100

 

Thank you

  • Hi JakobSt,

     

    Since you have multiple splits with different percentages, you should create a separate Splits table listing the source Cost Center, target Cost Centers, and split percentages.
    In your calculated column, you would:

    Look up the correct split percentage from the Splits table. Find the balance of the source Cost Center for the same Month then multiply the source balance by the split percentage and add that value to the current Balance.

    Use functions like LOOKUPVALUE or RELATED to fetch the split percentages.

    Use SUMX or CALCULATE with FILTER to get the balance of the original Cost Center (e.g., 912 or 913) for the same month, then calculate the new SplitBalance in your calculated column.

     

    If my response was helpful, consider clicking "Accept as Solution" and give us "Kudos" so that other community members can find it easily. Let me know if you need any more assistance!

     

    Thank you.

6 Replies

  • I would like to do this with a new measured column

    Do you want a measure, or a calculated column?

     

     

     

    • JakobSt's avatar
      JakobSt
      Regular Visitor

      Sorry, I meant a calculated column!

      • lbendlin's avatar
        lbendlin
        Super User
        SplitBalance =
        var m = [Month]
        return [Balance] + if([Cost Center] in {"900","901"},0.5*sumx(FILTER(Table2,[Month]=m && [Cost Center]="912"),[Balance]))