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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
selected_
Helper IV
Helper IV

How to measure two other measure in one column?

Ok so I have two mesaure like this 

 

Avg ProductID+OrderID = AVERAGEX(VALUES(Products[ProductID]), CALCULATE(AVERAGE('Order Details'[OrderID])))

 

 

 

Selling Price = AVERAGE('Products'[UnitPrice]) * (1-[Total Discount])

 

 

I tried with this but getting wrong number in return.

 

Average Selling Price = [Avg ProductID+OrderID]/[Selling Price]

 

 

My goal is to get all these three measure below into one column 

 

avg([ProductID], avg([OrderID],[Selling Price]))

 

and to get an Average Selling Price in return.

 

Anyone can help?

4 REPLIES 4
amitchandak
Super User
Super User

@selected_ ,

Selling price need to like

Selling Price = divide( sumx('Products','Products'[UnitPrice] * (1-[Total Discount])) ,Sum('Products'[UnitPrice]))

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Greg_Deckler
Super User
Super User

@selected_ - Can you show a screen shot or something of where you are getting a wrong value? You generally do not want to use measures in calculated columns if that is what you are trying to do.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I'm getting correct result number on each measure below 

 

 

Avg ProductID+OrderID = AVERAGEX(VALUES(Products[ProductID]), CALCULATE(AVERAGE('Order Details'[OrderID])))
Selling Price = AVERAGE('Products'[UnitPrice]) * (1-[Total Discount])

 

 

But the final step to get the Average Selling Price is I think I have to somehow calculate the Selling Price column and filter by the other column Avg ProductID+OrderID.

Is that possible way to do it?

Hi @selected_ ,

 

For your requirement, I'm not clear. What do you mean that Average Selling Price is filtered by the other column Avg ProductID+OrderID? 

Can you please share some screenshot, sample data and your expected results? Then we will understand clearly and solve it quickly.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors