Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Sum based on three distinct

Hi!


I have a set of data that cannot be changed and it looks like vizualized below. I want to based on distinct value of the column "Project", the distinct value of the column "Department" and as well as a distinct value of the column "Calculation" to sum the values in column "Values".

 

I created this table by entering 

Avdelning =
DISTINCT(SELECTCOLUMNS(Economy;"Project";Economy[Project];"Department";Economy[Department];"Calculation";Economy[Calculation]))

 

 

 

Could somebody help me?

  • sturlaws's avatar
    sturlaws
    6 years ago

    It does not really help. 

     

    I guess you will be needing the SUMMARIZECOLUMNS-function:

    Avdelning =
    SUMMARIZECOLUMNS (
        Economy[Project];
        Economy[Department];
        "Something"; SUM ( Economy[Whatever] )
    )

     

     

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi!


      Sorry, I realized it wasn't the best description. 

      I want something like SUMIFS in excel. I want to sum the costs based on project, department and calculation.

      Is this more clear?

      • sturlaws's avatar
        sturlaws
        Resident Rockstar

        It does not really help. 

         

        I guess you will be needing the SUMMARIZECOLUMNS-function:

        Avdelning =
        SUMMARIZECOLUMNS (
            Economy[Project];
            Economy[Department];
            "Something"; SUM ( Economy[Whatever] )
        )