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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DeBIe
Post Partisan
Post Partisan

How to get correct row total?

Hey all,

 

I've seen many posts online from people who experience this problem. I've been trying to implement other formulas to get this to work, but it isn't working for me. Please help.

 

I need the Income column to add up. I expect 31078(15380+15698).

My calculation:

Income = ('Table1'[Total Companies]) * (SUM(PriceTable[Price]))

DeBIe_1-1660134972588.png

 

 

Thanks for your time!


 

1 ACCEPTED SOLUTION
vojtechsima
Super User
Super User

Hi, @DeBIe 
Here's an idea but it's a bit sloppy, but you can play with the Virtual Table to adjust it to your needs:

Income = 

var Income = [Companies Original] * SUM('Table (2)'[Price])

var VirtualTable = SUMMARIZE('Table (2)','Table (2)'[Year], "Income", [Companies Original] * SUM('Table (2)'[Price]))
var GetTotal = SUMX(VirtualTable, [Income] )

return IF ( HASONEFILTER('Table (2)'[Year]), Income,GetTotal)

 

vojtechsima_0-1660138229264.png

 

 

View solution in original post

2 REPLIES 2
vojtechsima
Super User
Super User

Hi, @DeBIe 
Here's an idea but it's a bit sloppy, but you can play with the Virtual Table to adjust it to your needs:

Income = 

var Income = [Companies Original] * SUM('Table (2)'[Price])

var VirtualTable = SUMMARIZE('Table (2)','Table (2)'[Year], "Income", [Companies Original] * SUM('Table (2)'[Price]))
var GetTotal = SUMX(VirtualTable, [Income] )

return IF ( HASONEFILTER('Table (2)'[Year]), Income,GetTotal)

 

vojtechsima_0-1660138229264.png

 

 

@vojtechsima 

 

Thank you very much. It worked!

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 Kudoed Authors