Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

-

-

  • Hi Anonymous ,

     

    Given the example that you sent me in PM:

     

    I think the following measure could solve your problem:

     

    Revenue = (SUM(Table[Unit price]) - SUM(Table[Cost price])) * quantity

     

     

8 Replies

  • mwegener's avatar
    mwegener
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Anonymous,

    I think we do not understand the problem.

    Where do you have to multiply numbers with letters?

    You have to distinguish between DAX and Power Query, you can't use both at the same time.

     

    A simple DAX measure could look like this.

     

    revenue = SUM('Table'[net sale price]) - SUM('Table'[cost price])

     

     

  • Why do you need to add a quantity column.  Just simply add the Unit Price column.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      i haven't added it. it was just a example. Can you share your way of solving this?

  • I take it you have a separate table that holds the transactions (with the quantities)?

    Are you trying to multiple the quantities in a transaction table by the unit prices in the debtors table?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thats what i'm trying to do but i don't have a "quantity" table for the debtors, all the tables you see above is what i have. Is it still possible or do i need to have quantity table to calculate the revenue per debtor. 

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey Anonymous ,

     

    where do you have to multiply numbers with letters? I don't understand that step.

     

    Thank you and best regards

    Denis

     

  • Hi Anonymous ,

     

    Given the example that you sent me in PM:

     

    I think the following measure could solve your problem:

     

    Revenue = (SUM(Table[Unit price]) - SUM(Table[Cost price])) * quantity