Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Splitting Revenue

I have this table:      I need to write a measure that calculates what each person made when they owned the account. So basically, the [invoice date] (not pictured) would need to fall in bet...
  • PattemManohar's avatar
    PattemManohar
    7 years ago

    Anonymous I've tried with below sample Invoice data....

     

     

    Then try with below expression as a "New Column" in your AMs table

     

    Revenue = CALCULATE(SUM(Test66Invoices[Revenue]),FILTER(Test66Invoices,Test66Invoices[InvoiceDate]>=Test66Lkp[EntryDate] && Test66Invoices[InvoiceDate]<Test66Lkp[ExitDate] && Test66Lkp[Code] = Test66Invoices[Code])) 

    Added another condition to check the Code as well if incase if you have multiple codes as well.