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

How to multiple the last value with an increasing factor in DAX

I'd want to take the most recent value of Amount, which is sorted by date, then multiply it by increasing rate factor. For example, I'd like to know how much the Amount is increasing by 5% per day.

 

Date                   Amount
1/01/202124651
2/01/202154835
3/01/202121364
4/01/202112465
5/01/20214878
6/01/20211235
7/01/2021256363
8/01/2021215687
9/01/20217895
10/01/20211210
11/01/202156460
12/01/202148790
13/01/20211544
14/01/202178456

 

For instance, I anticipate the following Amount (15/1/2021) to be 78456 + 78456*0.05 = 82378.8, followed by (16/1/2021) 82378.8 + 82378.8 * 0.05 = 86497.74... and so on.

 

How can I do that in DAX please?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , A measure with help from date table

 

measure = 
var _max = maxx(allselected(Data), Data[Date]) 
var _amt = calculate(lastnonblankvalue('Date'[Date], sum(Data[Amount])), allselected())
return if(Max('Date'[Date]) <=_max, sum(Data[Amount]), _amt* power(1.05, datediff(_max, Max('Date'[Date]), Day)+1) )

 

file attached after signature

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , A measure with help from date table

 

measure = 
var _max = maxx(allselected(Data), Data[Date]) 
var _amt = calculate(lastnonblankvalue('Date'[Date], sum(Data[Amount])), allselected())
return if(Max('Date'[Date]) <=_max, sum(Data[Amount]), _amt* power(1.05, datediff(_max, Max('Date'[Date]), Day)+1) )

 

file attached after signature

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

Hi Amit,

 

Thank you so much for your help. This works perfectly. One question though, it does not work when I try to slice it by date, giving me blank value. How can I achive that with an existing measure? I appreciate your help. 🙂

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
Top Kudoed Authors