Forum Discussion
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
- amitchandakSuper 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- BorjaveigasvhRegular Visitor
I created the new column, and gives me a circular dependende error:
sales[price/surface],Stock[column],sales[price/surface]