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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Maristella
New Member

Calculate column by add column values of a row for defines values of other columns of the same row

Table organized as per below screenshot.

Maristella_0-1667215441587.png

I want to create three colums: "Total HFO Cons" , "Total LSFO Cons", "Total MGO Cons" with values

"Total HFO/LSFO/MGO Cons" =  'Consumption (Laden Days Anchorage/Idle)' (IF Fuel Type (Laden Days Anchorage/Idle) is HFO/LSFO/MGO respectively) + 'Consumption (Laden Days Port Operations)' (IF Fuel Type (Laden Days Port Operations) is HFO/LSFO/MGO respectively) 

 

What formula/query would bring the desired result as described on the problem above? 

2 REPLIES 2
Anonymous
Not applicable

Hi @Maristella 

Please correct me if I wrongly understood your problem .

For colums "Total HFO Cons" , if Fuel Type (Laden Days Anchorage/Idle) is same with Fuel Type (Laden Days Port Operations) , then result the sum of Consumption (Laden Days Anchorage/Idle) and Consumption (Laden Days Port Operations) ? For example , if Fuel Type (Laden Days Anchorage/Idle) is HFO , Fuel Type (Laden Days Port Operations) is HFO , then return 3+4.5=7.5 , right ? If Fuel Type (Laden Days Anchorage/Idle) and Fuel Type (Laden Days Port Operations) are different value , then return null ?

 

Best Regards,
Community Support Team _ Ailsa Tao

amitchandak
Super User
Super User

@Maristella , Based on what I got, Power Query Pivot column should help you

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Pivot Data(Power Query) :https://www.youtube.com/watch?v=oKByyI09Bno&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=12

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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