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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Borjaveigasvh
Regular Visitor

Pricing help needed!

Hi all!

I created a dataset from different sources, most of them tables in SQL

 

I would like to create calculate the prices for my products through past sales comparable.

 

In one table, I have all my products (which are real estate assets) 

On another table, I have my past sales

 I have a calculated measure that divides Price(€)/surface(sqm) this table has the attributes that I like to take on account such as ZIPCODE and PRODUCTTYPE both in columns

 

My new products (Stock) table has also both columns ZIPCODE and PRODUCTTYPE

 

Therefore, I would like to set a column that gives each product By ZIPCODE and PRODUCTTYPE the Price(€)/surface(sqm) regarding the average of my past sales 

 

Can anyone help me out this this? 

 

I attach a pic of the tables and the relationship between them if this might help. 

 

Thanks in advanced to anyone that could guide me with this issue 

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

Try creating this as a new column in stock table

New column in stock= averagex(filter(sales,Sales[ZIPCODE ]='stock'[ZIPCODE] && Sales[PRODUCTTYPE ]='stock'[PRODUCTTYPE]),Sales[Price(€)/surface(sqm)])

 

The other option is lookupvalue.

https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I created the new column, and gives me a circular dependende error:

 

sales[price/surface],Stock[column],sales[price/surface]

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.