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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to sum columns horizontally and dynamically

Hello Folks,

 

I would like to sum the "Shares Book Value" column Horizontally and Dynamically - one of the community members has shown how to sum it in a static way however it's not fitting my requirement.

 

fmourtaza_0-1593353825896.png

 

Thanks.

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous you should unpivot your table and then it will be easier to sum and view in any direction. 

 

- transform data
- select kind of portfolio column in the table
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply

To visualize,
- matrix visual:
- add  portfolio on rows,
- add attribute on columns
- add value on values section

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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 for your quick reply Parry,

 

I have implemented as you said, however the results has to be shown in another visual which looks inconvenient - and hybrid visuals are not yet supported by Power BI.

 

any other way ?

 

Regards.

 

@Anonymous you have to provide a specific example of what is not working and what you are trying to achieve. If you just say something looking inconvenient, I have no way knowing what you are referring too. The solution/approach is posted, it is based on the best practice.



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

@parry2k Harsh has suggested the same way and it works.

see https://community.powerbi.com/t5/Desktop/Add-new-column-and-count-the-frequency-of-a-boolean-value/m...

 

And as said I have to show the results in a new visuals - I thought there could be some way to merge or to show the results in the same table but seems not possible yet.

see https://community.powerbi.com/t5/Desktop/Merge-results-from-unpivot-visual-to-the-main-table-visuals...

 

Regards

Hi @Anonymous ,

 

I'm not clear about your requirement. The sample data is different from the previous threads. And you want to count values there but summarize here.

 

For merging tables, you still need to do it in Query Editor. You could reference the gif below to modify yours.

2.gif

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors