cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

## Create new column with values on previous rows

Hello Threre,

I have a table that consists of the columns below, I would like to have a formula that creates the columns "Socket-InComplete" and "Socket-InNewValue".

Formula View

DAX View.

Greatly appreciate any insights on this please, thank you.

1 ACCEPTED SOLUTION
Super User

@kumalasa , You need to create a cumulative/running total approach. You can use the previous row value which also calculating

example measure using date table

CALCULATE(SUM(Table[Stock In]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Stock Out]),filter(date,date[date] <=maxx(date,date[date])))

Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw

3 REPLIES 3
Super User

@kumalasa , You need to create a cumulative/running total approach. You can use the previous row value which also calculating

example measure using date table

CALCULATE(SUM(Table[Stock In]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Stock Out]),filter(date,date[date] <=maxx(date,date[date])))

Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw

Frequent Visitor

Thank you very much for your help. I have been stuck on this problem for a long time.

Responsive Resident

Please accept the Solution b y @amitchandak

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors