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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.