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

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

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.