Forum Discussion

mcmum01's avatar
mcmum01
Helper I
5 years ago

Multiply two values from the same table

Hi all

 

I have a table with transactions in it as well as well as rate per transaction. I would like to write a dax formula that finds the rate for the month and for the customer, and multiple it together to get to revenue. I could separate the transactions and rates into 2 different tables, but wanted to try something different. Example: ACME01, 1/1/21 = 100 * 10 = 1000. ACME01, 2/1/21 = 110 * 20 = 2200, etc. Is there any easy way to do this or should I just separate the rates and transactions into 2 tables?

 

GP Vendor ID

MeasureValueMonth
ACME01transactions1001/1/2021
ACME01rate101/1/2021
ACME01transactions1102/1/2021
ACME01rate202/1/2021
ABCE01transactions1153/1/2021
ABCE01rate303/1/2021

2 Replies

    • mcmum01's avatar
      mcmum01
      Helper I

      I tried that and I got some really big numbers. I gave you a small sample of a larger table. Would it be different if there were multiple GP Vendor IDs in a month? Here is an example:

       

      GP Vendor IDStoreMeasureValueMonth
      ACME011transactions1001/1/2021
      ACME011rate101/1/2021
      ACME012transactions1101/1/2021
      ACME012rate201/1/2021
      ACME013transactions1151/1/2021
      ACME013rate301/1/2021