Forum Discussion

Markie's avatar
Markie
Regular Visitor
5 years ago
Solved

Conditional sum of values in column

Hi all!

 

I have a a dataset such as:

 

TypeValue

Month

Income123

Jan

Expense321

Feb

Other456

Mar

 

I'd like to sum all incomes per month as well as expenses.

 

Once i do that i'll be able to substract Income-Expense and display a burndown chart of the finances.

 

Any help would be appreciated on how to best achieve it.

 

Thanks in advance!

  • Hi Markie

     

    You can create three measures and put them as well as the Month column into a table visual to check the sum result.

    Incomes Total = CALCULATE(SUM('Table'[Value]),'Table'[Type]="Income")
    
    Expenses Total = CALCULATE(SUM('Table'[Value]),'Table'[Type]="Expense")
    
    Remains = [Incomes Total] - [Expenses Total]

     

    You can put these measures in other visuals later.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

1 Reply

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi Markie

     

    You can create three measures and put them as well as the Month column into a table visual to check the sum result.

    Incomes Total = CALCULATE(SUM('Table'[Value]),'Table'[Type]="Income")
    
    Expenses Total = CALCULATE(SUM('Table'[Value]),'Table'[Type]="Expense")
    
    Remains = [Incomes Total] - [Expenses Total]

     

    You can put these measures in other visuals later.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.