'Measure based on multiple parameters

How to create a measure based on multiple paramaters? I have table with given quantities per customer, by parameters I want to input prices per each customer and by measure I want calculate sales per each customer. But I don't know how to calculate it be each customer sepatately? So in that example it shoud be Sales for Nikola= Nicola quantities x Nicola price parameter; Sales for Olaf=Olaf quantities x Olaf price parameter ect.

enter image description here



Solution 1:[1]

If for each customer the price varies maybe you should do another table with prices that contains the ID of the customer and the price. Then you can make a relationship between the quantity table (lets say Sales) and the price table(Price). Next step is to calculate quantity * price. So you write:

Total Sales = SUMX('Sales', 'Sales'[Quantity], RELATED('Price'[Price])

If you create a table visual with the customer names and the Total Sales measure, you'll be able to see the total sales for each customer. I hope this helps.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 monkey