Forum Discussion

JohnYEG's avatar
JohnYEG
Frequent Visitor
4 years ago
Solved

Create a measure from summing from two separate columns (if client occurs in either column)

Looking to see how I can create a measure that is able to track the revenue of a Client if it occurs in either column. 

 

 

For example I would like to record the revenue of Client A on whether if they were a billing company or end company.

 

For example, company A was a billling twice ($400) and End Company once ($200)

 

So I would like a measure that shows Company A = $600.

 

Thank you,

 

11 Replies

  • JohnYEG 

    This measure should work for you:

     

    Revenue A = 
    VAR __CO = "A"
    RETURN
    CALCULATE(
        SUM(Table[Revenue]),
        (Table[Billing Company] = __CO || Table[End Company] = __CO) 
    )
    

     



  • Hi,

     

    You can create measures and manipulate them, like:

     

    Measure 1= Calculate(sum(column[revenue]), Billing company = "A")

    Measure 2= Calculate(sum(column[revenue]), Billing company = "B")

    Measure 3= Calculate(sum(column[revenue]), Billing company = "C")

     

    And then make another measures using Measure1, 2 and 3.

     

    Regards!

    • JohnYEG's avatar
      JohnYEG
      Frequent Visitor

      Are you saying that then I would another measure 

      Measure 1 End Company A = Calculate(sum(column[revenue]), End Company = "A")

      then I would add Measure 1 + Measure 1 End Company A = total revenue of Company A?

       

       

      • HenriqueReis's avatar
        HenriqueReis
        Icon for Resolver I rankResolver I

        Im not sure if it's what you want, but by  what I understood, it's going to work rsrs

  • Anonymous's avatar
    Anonymous
    Not applicable

    You are welcome JohnYEG