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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Samhunt
Helper II
Helper II

Need Help with Power Query

Hi everyone, I am new to this and I am looking for some help. 

 

So this is my table. 

 

STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment   
Booking referenceCheck-out dateExtras amount (€)Commercial margin (€)
1958920507/10/2023600
2016155512/10/2023600
1842005522/10/2023550
1943621828/10/2023600
2032105205/11/2023600
Subtotal 2950
    
STAY Short Lets Ltd, 100 AN - Napa Living 20   
Booking referenceCheck-out dateExtras amount (€)Commercial margin (€)
2006913610/10/2023280
2016303319/10/2023280
2025261924/10/2023280
2028226701/11/2023280
Subtotal 1120
    
STAY Short Lets Ltd, 100 AN - Napa Living 16   
Booking referenceCheck-out dateExtras amount (€)Commercial margin (€)
2008907806/10/2023280
2017008419/10/2023280
2025996425/10/2023280
2031235131/10/2023280
Subtotal 1120
    

 

What I want to do is to add a new column that will use the data in the first column. 

 

Whenever it detects an empty cell, It will return the value below the empty cell, whenever there is some value in the cell it will return the value above the cell in the new column.

 

 Assume that I am adding a formula in excel In column A in Cell A2 and I use the information on column B my formula will be the following:= IF(B1="", B2, A1)   

This formula results in the following

 

 Sales profit margin per accommodation and booking   
0    
STAY Short Lets Ltd, 20 ATR -Trinity (1) ApartmentSTAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment   
STAY Short Lets Ltd, 20 ATR -Trinity (1) ApartmentBooking referenceCheck-out dateExtras amount (€)Commercial margin (€)
STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment1958920507/10/2023600
STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment2016155512/10/2023600
STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment1842005522/10/2023550
STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment1943621828/10/2023600
STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment2032105205/11/2023600
STAY Short Lets Ltd, 20 ATR -Trinity (1) ApartmentSubtotal 2950
STAY Short Lets Ltd, 20 ATR -Trinity (1) Apartment    
STAY Short Lets Ltd, 100 AN - Napa Living 20STAY Short Lets Ltd, 100 AN - Napa Living 20   
STAY Short Lets Ltd, 100 AN - Napa Living 20Booking referenceCheck-out dateExtras amount (€)Commercial margin (€)
STAY Short Lets Ltd, 100 AN - Napa Living 202006913610/10/2023280
STAY Short Lets Ltd, 100 AN - Napa Living 202016303319/10/2023280
STAY Short Lets Ltd, 100 AN - Napa Living 202025261924/10/2023280
STAY Short Lets Ltd, 100 AN - Napa Living 202028226701/11/2023280
STAY Short Lets Ltd, 100 AN - Napa Living 20Subtotal 1120
STAY Short Lets Ltd, 100 AN - Napa Living 20    

 

 

So I want to add the property on each row that there is a numerical value in the Booking reference, the empty space will be used to mark that there is a change in property. 

 

Regards

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

That's not something you want to do in Power BI.  Bring your table into a usable format (moving the location into its own column)  and then all the other issues will go away.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

That's not something you want to do in Power BI.  Bring your table into a usable format (moving the location into its own column)  and then all the other issues will go away.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.