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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
STEPH0018
Helper II
Helper II

How to get data from previous row with complex measure

Hey guys!
I was wondering if there was any way I could create a measure using DAX that is capable of adding the value of itself in the past.

The first instance of the variable “Measure”, represented by the letter “a” in the yellow column, would be equal to 0, that is, on the first date chosen by the user. In the following instances, the value of the variable “Measure” should be equal to the value of the “Contribution” variable plus the “Measure” variable in the previous instance multiplied by the “Divisaocota” variable of the instance divided by the “Divisaocota” variable of the previous instance.

Here is an example of what I mean:

Measure0 = 0

Measure1 = Contribution1 + Measure0 (Divisaocota1/Divisaocota0)

Measure2 = Contribution2 + Measure1 (Divisaocota2/Divisacao1)

STEPH0018_0-1629841843272.png

 

STEPH0018_1-1629841901545.png

 

Data are in: https://drive.google.com/drive/folders/1wfkZjv2cpnAZpa0F30PTcmr6n7DKZGkS?usp=sharing

 

I read some documents about recursion here, but none fit my measure. How would I go about doing this?

Thanks so much guys!

 

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@STEPH0018 Short answer is that it is more trouble than it is worth. Previous Value (“Recursion”) in DAX - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Someone would know that?

So, do you think it's basically impossible to do that in power bi DAX?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.