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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
eyesem
Helper I
Helper I

Sum rows from visual table

Hi

 

I need some help with something that I guess must be very simple but can't figure out.

I have this visual object (table) with columns from different tables with quite a complex structure between them. I'd like to sum several of the columns from this table in a new column:

caption.png

 

 

 

 

 

 

 

 

relationshipsrelationships

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I tried with this calculations but both seem to be wrong:

 

F_Calculada = sumx('Consumo Click';'Consumo Click'[PFAnexo__c]) - sumx('Cotización de periodo';'Cotización de periodo'[GNF_CVCliente__c]) + sumx('Consumo Click';'Consumo Click'[GNF_descuentoClickAbs__c])
 
F_Calculada = sum('Consumo Click'[PFAnexo__c]) - sum('Cotización de periodo'[GNF_CVCliente__c]) + sum('Consumo Click'[GNF_descuentoClickAbs__c])
 
Any help?
 
Thanks!
4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Not exactly a measure totals problem but the same technique should work. You would need to essentially replicate your table visualization in a table variable in DAX.  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



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...

My problem is when trying to create a measure at the row level. If I sumx a variable from another table I get an out of memory error.

In the table 'consumo click' this works fine:

F_Calculada = sumx('Consumo Click';'Consumo Click'[PFAnexo__c])

But this doesn't:

F_Calculada = sumx('Consumo Click';'Consumo Click'[PFAnexo__c]) - sumx('Cotización de periodo';'Cotización de periodo'[GNF_CVClientePrima_Click__c])

 "The report ran out of memory, and the application must close"

 

I just need to add 3 values I'm already seeing in my visual table for each row!

Anonymous
Not applicable

It's a good practice if you avoid the measures that are designed keeping specific visualization in mind.

Let us consider an example based on the data provided above.

1. The years are identifiers for the rows in the table

2. If any other column or row is added like month then the behavior of the measure will be different

The part of your formula for the calculation the total measure would work well on the detail rows when iterating over VALUES(Table[Year] instead of Table itself:

MyMeasure3 = SUMX(FILTER(VALUES(Table[Year]),[Amount]>1000),[Amount]-1000)
However, VALUES(Table[Year]) would contain only one row while the filtered table is empty when [Amount]<=1000.

This means that rows for years with [Amount] lower than 1000 should have a blank value. In case you want to have 0 instead of blank, you can just add 0 to the result:

MyMeasure3 = SUMX(FILTER(VALUES(Table[Year]),[Amount]>1000),[Amount]-1000) + 0
Hope this helps!!

Admin

Apps4rent | o365cloudexperts | clouddesktoponline

amitchandak
Super User
Super User

I think the formula is correct. I doubt so the relation is not working. The other thing is that you can group is a level using summarize. example

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.