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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-xinruzhu-msft
Community Support
Community Support

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
v-xinruzhu-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.