Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
TomBrilliant
Frequent Visitor

Calculate net price and revenue with measue

I am trying to calculate the revenue with a few measures:

net price = (1-discount)*SUMX(Article, Article[gross price])
quantity = SUMX('pricelistline', pricelistline[quantity])
revenue = quantity * net price

 

I understand that the total revenue is the sum of quantity * sum of net price, but this gives me wrong total revenue. What sould I change? Net price does not need to be summarized.

TomBrilliant_0-1704274410426.png

 

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @TomBrilliant ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
some_bih
Super User
Super User

Hi @TomBrilliant without your model it is hard to spot issue and propose some possible solutions.

Still, it seems that it could be (one possible solution) that you need to "create" net price as calculated column in your SAME table  as quantity. After that, simple SUMX (<same table>, net price*quantity) 

Another solution is related to RELATED function to "bring" data on same row.

Go to your model and think how to connect your inputs





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hi! thank you for your reply. This is hard because the value of the gross price and the quantiy both origin of another tables. I have a feeling it can be solved with measures, but I don't know how.

 

Hi @TomBrilliant it could be...

Share simple file with ecpected output (office 365, dropbox ...links)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements