Forum Discussion

Sk_an_'s avatar
Sk_an_
New Member
2 years ago
Solved

SUM

I want to summerize two colums Income - cost to profit. The colums contains filters, and it is a filer on project. Can somebody help me?

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Sk_an_ ,

     

    You can create a calculated column or a measure to get profit.

    Calculated column:

    Profit Calculated column = [Income]-[Cost]

     

    Measure:

    Profit Measure = SUM('Table'[Income])-SUM('Table'[Cost])

     

    You can learn about the difference between measures and calcualted columns from below.

    Calculated Columns and Measures in DAX - SQLBI

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

2 Replies

  • PijushRoy's avatar
    PijushRoy
    Icon for Community Champion rankCommunity Champion

    Hi Sk_an_ 

    Your question is not clear to me, please describe with example

    You can similar DAX as menioned below
    = CALCULATE(SUM('Table[Income]',FIlter(TableName,FilterExpression)) - CALCULATE(SUM('Table[Cost]' )



  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Sk_an_ ,

     

    You can create a calculated column or a measure to get profit.

    Calculated column:

    Profit Calculated column = [Income]-[Cost]

     

    Measure:

    Profit Measure = SUM('Table'[Income])-SUM('Table'[Cost])

     

    You can learn about the difference between measures and calcualted columns from below.

    Calculated Columns and Measures in DAX - SQLBI

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.