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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Sum two rows to create a new row with new name

Hi Expert

 

I have a fact table which give me the following when field values are added to a standard table (AS-IS)

 

Grp_IDMetric£
a1Sale647
a2Frieght Level1520
a3Feight Level245

 

I would to sum Grp_ID a2 +a3 to show that data as

a1Sale647
a2+a3Total Freight565

 

is it possible to the above using a DAX measure - my current measure is

Current Period =
IF (
TRIM ( FIRSTNONBLANK ( Grp_Sumry_Rep[Grp_Id], "" ) ) = "a2"
|| TRIM ( FIRSTNONBLANK ( Grp_Sumry_Rep[Grp_Id], "" ) ) = "a3"
[Sales],
blank())
 
I would like to add a2+a3 and create a new row called Total Frieght
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous this is what I will do to keep it simple, add new column:

 

New Group Id = 
IF ( Table[Grp_Id] IN { "A2", "A3" }, "A2+A3", Table[Grp_Id] )

New Metric = 
IF ( Table[Grp_Id] IN { "A2", "A3" }, "Total Freight", Table[Metric] )

 

In visual, use New Group Id, New Metric, and SUM of the amount and all should work as expected. 

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@Anonymous this is what I will do to keep it simple, add new column:

 

New Group Id = 
IF ( Table[Grp_Id] IN { "A2", "A3" }, "A2+A3", Table[Grp_Id] )

New Metric = 
IF ( Table[Grp_Id] IN { "A2", "A3" }, "Total Freight", Table[Metric] )

 

In visual, use New Group Id, New Metric, and SUM of the amount and all should work as expected. 

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks parry2k, let me apply that and report back with feedback.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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