Forum Discussion

Andy_Peak's avatar
Andy_Peak
New Member
8 years ago
Solved

Sum values from multiple rows and columns by corresponding variables

I'm struggling with writing my DAX code to return the sum totals I need. Below is a sample data set based on what I'm working with. Based on how the data is structured, I need to return the total sav...
  • v-yuta-msft's avatar
    8 years ago

    Hi Andy_Peak,

     

    To achieve your requirement, duplicate your original table to three tables. Remove columns in the three table as below:

    Table1:                                                                            Table2:

     

    Table3:

     

     

    Then Append Table1, Table2 and Table3:

     

     

    Finanlly, after applied&closed, create a measure using DAX below:

    Result = CALCULATE(SUM(Append1[Facilitator Savings]), ALLEXCEPT(Append1, Append1[Facilitator]))

     

     

    Regards,

    Jimmy Tao