cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LaurieS
Frequent Visitor

Using DAX Loops - Can it work for this?

I'm trying to create a table visual (as below), where I can specify the starting point, and then use the output from the previous month to calculate the output for the next, and so on. I'll try to explain the best way I can.

 

I'm staring with the value for 1081 for 12/31/2019 (that is a static value). I then want to take that value and use it in a calculation for the next month(s) output.

Example:

Jan2020: 1081+341-453 = 969

Feb2020: 969+352-271=1050... and so on

Capture.PNG

I started with the following DAX, but this obviously won't work throughout (so I stuck a temporary blank in there for result after Jan). 

Capture2.PNG

I'm assuming I need a loop so I can store the previous output in a variable to use in the next month's calculation. I am pretty good with DAX, but not familiar enough to understand the looping mechanism needed for something like this. Any direction would be greatly appreciated.

 

Thanks, Laurie

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User II
Super User II

2 REPLIES 2
wdx223_Daniel
Super User II
Super User II

Thank you so much! Works perfectly.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors