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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
kumalasa
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

kumalasa_3-1670294568698.png

 

 

DAX View.

kumalasa_2-1670294178622.png

 

kumalasa_1-1670293822455.png

Greatly appreciate any insights on this please, thank you.

1 ACCEPTED SOLUTION
amitchandak
Super User
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

View solution in original post

3 REPLIES 3
amitchandak
Super User
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

@amitchandak ,

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

 

kumalasa_1-1670300682322.png

 

kumalasa_0-1670300558469.png

 

Datagulf
Responsive Resident
Responsive Resident

Please accept the Solution b y @amitchandak 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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