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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Subtraction based on if formula to create a new column Heading

Hi Experts

 

See link to sample data...

 

Ref to table Logistics in sample file and column New_Reporting_Headings - See 4 rows from bottom i have Total Logistics - I want to create this header based on the following 

 

(Inbound Freight + Duty + Warehousing - Fixed + Warehousing - Variable +SC&L People + outbound Freight) using the if formula??

https://www.dropbox.com/s/tbjnpv2wgiky3wc/PLP_Test.pbix?dl=0 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

solved it

New_Reporting_Headers =
IF( Logistics_[GrpId] = "a3", "External Sales",
IF( Logistics_[GrpId] IN { "a7", "a8" }, "Inbound Freight",
IF( Logistics_[GrpId] IN { "b2", "b3", "b4" }, "Duty",
IF(Logistics_[GrpId] IN { "i5", "i6" }, "Warehousing - Fixed",
IF(Logistics_[GrpId] IN { "i7", "j1" }, "Warehousing - Variable",
IF(Logistics_[GrpId] IN { "i1", "i2", "i3", "i4" }, "SC&L People",
IF(Logistics_[GrpId] IN { "i8", "i9", "j2", "j3" }, "Outbound Freight",
if(Logistics_[Reporting_Headers] IN { "a7", "a8", "b2", "b3", "b4", "i5", "i6", "i7", "j1", "i1", "i2", "i3", "i4", "i8", "i9", "j2", "j3" }, "Total Logistics",
Logistics_[Reporting_Headers]))))))))

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , are you looking Dynamic Title ?
https://www.youtube.com/watch?v=TYLKDPcvgK8
https://www.blue-granite.com/blog/create-a-dynamic-title-in-power-bi-updated

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

solved it

New_Reporting_Headers =
IF( Logistics_[GrpId] = "a3", "External Sales",
IF( Logistics_[GrpId] IN { "a7", "a8" }, "Inbound Freight",
IF( Logistics_[GrpId] IN { "b2", "b3", "b4" }, "Duty",
IF(Logistics_[GrpId] IN { "i5", "i6" }, "Warehousing - Fixed",
IF(Logistics_[GrpId] IN { "i7", "j1" }, "Warehousing - Variable",
IF(Logistics_[GrpId] IN { "i1", "i2", "i3", "i4" }, "SC&L People",
IF(Logistics_[GrpId] IN { "i8", "i9", "j2", "j3" }, "Outbound Freight",
if(Logistics_[Reporting_Headers] IN { "a7", "a8", "b2", "b3", "b4", "i5", "i6", "i7", "j1", "i1", "i2", "i3", "i4", "i8", "i9", "j2", "j3" }, "Total Logistics",
Logistics_[Reporting_Headers]))))))))
Anonymous
Not applicable

Hi Amit - No just to amend the if formula to Total Logistics.... the same way i have combined two headings to give Inbound Freight 

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.