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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.