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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors