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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

AVG Sales Price Index Calculation

i have the following date realestate data:

Avarage Sales Price per SQM which is a measure.

the following is the formula i used to create the measure from avalable data:

AVG SALES PRICE PER SQM = DIVIDE([SUM OF RS PRICE], [SUM OF AREA], 0)
 
now i want to calculate the index. and that is:
(Present Average sales price per square meter) - (Past Period Average sales price per square meter) / (Past Period Average sales price per square meter)
 
by Period i mean either year or quarter. 
 
how can i creat the above formula.?
 
thanking you

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Please try this one ROUNDUP(MONTH(Table1[Date])/3,0) .

 

Best Regards,

Amy

 

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

 

View solution in original post

10 REPLIES 10
v-xicai
Community Support
Community Support

Hi  @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case.

 

Best regards

Amy Cai

Ashish_Mathur
Super User
Super User

Hi,

Create a Calendar Table and build a relationship from the Date column of your Real Estate Table to the Date column of your Calendar Table.  In the Calendar Table, extract the Year by using this calculated column formula - Year = YEAR(Calendar[Month]).  To your slicer, drag Year from the Calendar Table and select any one year.  Write this measure

AVG SALES PRICE PER SQM IN PREVIOUS YEAR = CALCULATE([AVG SALES PRICE PER SQM],PREVIOUSYEAR(Calendar[Date]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create measure like DAX below, assuming by the period year, as well you can use YAER(Table1[Date]) to get Year column or use ROUNDUP(MONTH(Table1[Date])/3,0) to get Quarter column first of all.

 

Measur1 =

VAR _previous = CALCULATE([AVG SALES PRICE PER SQM ],FILTER(ALLSELECTED(Table1), Table1[Year] =MAX(Table1[Year]) -1))

VAR _current = CALCULATE([AVG SALES PRICE PER SQM ],FILTER(ALLSELECTED(Table1), Table1[Year] =MAX(Table1[Year])))

return

IF(_previous<>BLANK(),DIVIDE(_current-_previous, _previous),BLANK())

 

Best Regards,

Amy

 

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

Anonymous
Not applicable

Thank you for your reply, 

I tried to creat the quarter with the given ROUNDUP formula

but the result as you see, first its not accepting the zero 

ROUNDUP ERROR.JPG

and if i remove the zero its saying too few argument.

 

while u check this i will creat a quarter as follows 

QUARTER = FORMAT(table1[datecolumn].[Date],"Q")
 
will this be ok?

Hi @Anonymous ,

 

Please try this one ROUNDUP(MONTH(Table1[Date])/3,0) .

 

Best Regards,

Amy

 

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

 

Anonymous
Not applicable

Again its not accepting 

ROUNDUP(MONTH(Table1[Date])/3,0) 

ROUNDUP ERROR2.JPG

when i come to type the [DATE] after the table name its only showing option to measures, not giving option select the data column

 

Anonymous
Not applicable

There is also error in the second formula, not accepting VAR _current

 

VAR ERROR.JPG

Hi @Anonymous ,

 

Based on my test , it worked fine. Please check the brackets (plus or miss) in the two DAX formula, and try it again.

 

3.png

 

 

Best Regards,

Amy

 

Anonymous
Not applicable

Hello Amy, 

 

I got the quarter column. now what about the measure that u suggested. i have the following error when i try to create.

 

VAR ERROR.JPG

Hi @Anonymous,

 

Please pay attention to these symbols in the DAX formula,delete it, and try it again.

 

5.png

4.png

 

 

 

 

 

 

 

 

Best Regards,

Amy

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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