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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arutsjak90
Helper I
Helper I

DAX, Calculation based on Previous row

Hi,

I am trying to create column quite similar to what I have prepared in excel.

It is based on 4columns.

NewSubBalance = 

(for the minimum value in column Key) Requirements

for the next rows as in formula below

if((CurrentCapacityHrs (earlier row) > NewSubBalance(earlier row)) then Requirements (current row) else Requirements (current row) + NewSubBalance(earlier row) - CurrentCapacityHrs(earlier row)) 

2021-07-06_16h29_13.png

3 REPLIES 3
daxer-almighty
Solution Sage
Solution Sage

DAX is not Excel. Recursive calculations in DAX are often not possible. From your description it follows that you want a calculated column, not a measure. Use Power Query to perform this and similar calculations.

It is just an example to explain what I want to achive by calculated column. I am using Power BI, excel is as I said an example to illustrate calculation.

As I said, this type of caclulation should be (or even must be) performed in the source or in Power Query.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors