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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Get the previous value with non-date column

Hi team,

I need a help in getting "only" the previous row value.  In the below image, "Prev" calculating cumulative. How do i modify it to show only the previous value without cumulative total.

 

LP28D_0-1629190103726.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I updated my measure "Prev" as below which worked.

 

Prev =
var a = CALCULATE(MAX('Dynamic Date Scope'[ranking]))+1
Return CALCULATE(SUM(Volume[Record ID]),FILTER(ALLSELECTED('Dynamic Date Scope'),'Dynamic Date Scope'[ranking]=a))
 
Ranking is the column that i created in the Dataset itself while querying from DB.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I updated my measure "Prev" as below which worked.

 

Prev =
var a = CALCULATE(MAX('Dynamic Date Scope'[ranking]))+1
Return CALCULATE(SUM(Volume[Record ID]),FILTER(ALLSELECTED('Dynamic Date Scope'),'Dynamic Date Scope'[ranking]=a))
 
Ranking is the column that i created in the Dataset itself while querying from DB.
amitchandak
Super User
Super User

@Anonymous , Create a new table with distinct VD1 (FY Month) , Period and ranking

Rank should be same as

Rank = rankx(period, [VD1], ,asc, dense)

 

The create measures like

This Period = CALCULATE(sum('Table'[Qty]), FILTER(ALL("Period"),"Period"[Period Rank]=max("Period"[Period Rank])))
Last Period = CALCULATE(sum('Table'[Qty]), FILTER(ALL("Period"),"Period"[Period Rank]=max("Period"[Period Rank])-1))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Thanks Amit.

I will try this method. Thanks for helping me on this.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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