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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Lvmoraes
Helper I
Helper I

Using sum in a row level - Understanding

Hello,

 

Can you please help me understanding how an aggregation function works on a row level? ( Sum for example )
I thought it would behave like Excel, but this is what happens ( it summarizes everything on each row):9.PNG

 

Just trying to understand, thank you very much

 

Lucas

1 ACCEPTED SOLUTION


@Lvmoraes wrote:

Hi Erik,

 

not really, the question actually is why the sum is not summing the values for that record? Example:

Product  Tax  Sum(Tax)

Belt          0        0

Hat          1        1

 

Instead, it will ignore the row and sum the total, like:

Product  Tax  Sum(Tax)

Belt          0        1

Hat          1        1

 

It's the red 1 I don't get.

 

Your example is really cool, I will accept it as correct... but if you can just confirm that's how PowerBI behaves if you try to Aggregate at a column, would be fine.

 

Kind regards,

Lucas

 


@Lvmoraes

If you mean measures in a chart, it's all about context. See

total = SUM(yourTable[Tax])

totalAll = SUMX(ALLSELECTED(yourTable),yourTable[Tax])

Capture.PNG

View solution in original post

3 REPLIES 3
Eric_Zhang
Microsoft Employee
Microsoft Employee


@Lvmoraes wrote:

Hello,

 

Can you please help me understanding how an aggregation function works on a row level? ( Sum for example )
I thought it would behave like Excel, but this is what happens ( it summarizes everything on each row):9.PNG

 

Just trying to understand, thank you very much

 

Lucas


@Lvmoraes

What do you mean "in a row level"? If you refer to "product" level, you can try

SumColumn = CALCULATE(SUM(MapProds[Tax]),ALLEXCEPT(MapProds,MapProds[Product]))

Capture.PNG

Hi Erik,

 

not really, the question actually is why the sum is not summing the values for that record? Example:

Product  Tax  Sum(Tax)

Belt          0        0

Hat          1        1

 

Instead, it will ignore the row and sum the total, like:

Product  Tax  Sum(Tax)

Belt          0        1

Hat          1        1

 

It's the red 1 I don't get.

 

Your example is really cool, I will accept it as correct... but if you can just confirm that's how PowerBI behaves if you try to Aggregate at a column, would be fine.

 

Kind regards,

Lucas

 


@Lvmoraes wrote:

Hi Erik,

 

not really, the question actually is why the sum is not summing the values for that record? Example:

Product  Tax  Sum(Tax)

Belt          0        0

Hat          1        1

 

Instead, it will ignore the row and sum the total, like:

Product  Tax  Sum(Tax)

Belt          0        1

Hat          1        1

 

It's the red 1 I don't get.

 

Your example is really cool, I will accept it as correct... but if you can just confirm that's how PowerBI behaves if you try to Aggregate at a column, would be fine.

 

Kind regards,

Lucas

 


@Lvmoraes

If you mean measures in a chart, it's all about context. See

total = SUM(yourTable[Tax])

totalAll = SUMX(ALLSELECTED(yourTable),yourTable[Tax])

Capture.PNG

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors