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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Offset Function not working on Month year dimension column and calculate

Hi Community,

I am trying to use offset function to get previous value for each row . So , i created a measure as shown below. 

 

However, it is not working as expected. Kindly assist on same. 

b =
    CALCULATE(average( [level_percentage]),OFFSET(-1,ALL('Monthly Calendar Table'[Month Year]),orderby('Monthly Calendar Table'[Month Year],asc)))

 

Screenshot 2022-11-01 153109.jpg

 

Venkatesh

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I guess [Month Year] column is sorted by another column. In case the sort-by-column is involved, the measure has to include this sort-by-column as well.

 

https://jihwankimcscp.wixsite.com/supplychainflow/post/when-can-i-use-offset-dax-function-in-power-b...

 

I hope this helps.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Yes Thanks a lot @Jihwan_Kim . It worked . Thanks for sharing the link for reference. 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I guess [Month Year] column is sorted by another column. In case the sort-by-column is involved, the measure has to include this sort-by-column as well.

 

https://jihwankimcscp.wixsite.com/supplychainflow/post/when-can-i-use-offset-dax-function-in-power-b...

 

I hope this helps.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors