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

Sum of rows

Hi

 

I have a simple question, as a newbie I couldn't find the answer.

In my xlsx file there are amongst other the following columns:

- Price

- Shipment

- Sales Price

-> Sales Price is Price + Shipment

 

- Should I remove the Sales Price from the imported table and then calculate it later in order to save 1 column?

- How can I display the product of each row of two columns in a visual table?

 

Thank you for your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Dont know what was wrong but I created a measure with "measure = sum(a)+sum(b)" and now it's working. So it's solved.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Dont know what was wrong but I created a measure with "measure = sum(a)+sum(b)" and now it's working. So it's solved.

Icey
Community Support
Community Support

Hi @Anonymous ,

 

This is by design. In Power BI Report View, it will only return the distinct rows content which every row value is the unique key in visuals. While it will show all rows as Data view ,once you drag the other different value fields which are from related table onto the visuals. 

For eample, an index column:

C column.JPG

C Measure.gif

 

For more details, please check the attached .pbix file.

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Greg_Deckler
Community Champion
Community Champion

@Anonymous - Couple schools of thought here. One is that if Sales Price has lots of unique values, you can save space in the data model by not including it and doing it as a measure instead. You will need this though for your grand total as you will likely have a measures total problem. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

Otherwise, if you data model size is not a concern then I would just include the Sales Price column and call it a day. You could then use the default SUM aggregation on that column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks man, I appreciate.

amitchandak
Super User
Super User

@Anonymous , You can create a measure

sum(Shipment) -Sum(Price)

 

See if this can work

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi, I guess you meant sum(Shipment) +Sum(Price) -> as I need  the sum of Shipment + Price and not minus.

However, this works partially. It sums all the same values in a column. But I need a list with every single calculation.

Example:

Correct in Excel:

A     B     C

1     2     3

0.5  2     2.5

0.5  2     2.5

0.5  2     2.5

6     3     9

(A+B = C for each row)

 

Now based on your solution I get this in Power BI:

A     B     C

1     2     3

0.5  6     7.5

6     3     9

 

How can I display the three times 0.5+2=2.5 as three single rows instead of one row?

@Anonymous 

in the power query editor, select all the columns and click remove Duplicates.

1.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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