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
Newbie2712
New Member

How to transform Calculated Column function to Measure

Newbie2712_0-1689820477325.png

I have this function but it only work in calculated column but i want it to be a measure

Please help me 

Thanks for your help

 

data: 

Newbie2712_0-1689822124012.png

I want it to be like this:

Newbie2712_2-1689822201226.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Newbie2712 

You can use offset function.

e.g  

 

Measure = CALCULATE(SUM('Table'[TotalOrder]),OFFSET(-1,ALLSELECTED('Table'[Mon]),ORDERBY([Mon],ASC)))

 

Output

vxinruzhumsft_0-1690180848701.png

 

Best Regards!

Yolo Zhu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Newbie2712 

You can use offset function.

e.g  

 

Measure = CALCULATE(SUM('Table'[TotalOrder]),OFFSET(-1,ALLSELECTED('Table'[Mon]),ORDERBY([Mon],ASC)))

 

Output

vxinruzhumsft_0-1690180848701.png

 

Best Regards!

Yolo Zhu

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

Ashish_Mathur
Super User
Super User

Hi,

Share some data in a format that can be pasted in an MS Excel file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.