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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MarcoT
Frequent Visitor

SUMX SUMMARIZE group by company in a table

Hi all. I have a simple table made of 2 fields and 1 measure:

 

MarcoT_0-1710514046624.png

 

where

 

 

_Sales Denominator YA ORG =

CALCULATE(
[_Sales YA ORG]
, ALL(Company[Company], Company[Brand],Company[Sub Brand], Company[Variant])
, ALLSELECTED(Period[Period])
,ALLSELECTED('Market Breakdown'[Country])
,ALLSELECTED('Organic Claim'[Organic Claim])
, VALUES('W Segment'[W Segment])
, VALUES('Market Brkdown'[Hier Level Name])
, VALUES('Ad Hoc Analysis View'[Category])
, VALUES('Ad Hoc Analysis View'[Segment])
)

what I want to do is to delete the country field and obtain one row for each company with the sum of each _Sales denominator YA ORG for each company. For example I want this result:

Company_Sales denominator YA ORG
PRIVATE LABEL3402952
STRAUSS GROUP206
TCHIBO36854
TONYS COFFEE ROASTERS2895
VERGNANO1131
WERTFORM3987
WICKED JOE LLC23592
WOSEBA1035

So what I've tried is to modify the measure this way:

_Sales denominator YA ORG=

SUMX(

SUMMARIZE( 'Ad Hoc Analysis View',

'Ad Hoc Analysis View'[Company],

"x_per_company",

CALCULATE( [_Sales YA ORG],

ALL(Company[Company], Company[Brand],Company[Sub Brand], Company[Variant]),

ALLSELECTED(Period[Period]),

ALLSELECTED('Market Brkdown'[Country]),

ALLSELECTED('Organic Claim'[Organic Claim]),

VALUES('W Segment'[W Segment]),

VALUES('Market Brkdown'[Hier Level Name]),

VALUES('Ad Hoc Analysis View'[Category]),

VALUES('Ad Hoc Analysis View'[Segment])

)

), [x_per_company]

)

 

But I obtain this table, with summarized values that are different from what I expect:MarcoT_0-1710514721038.png

 

Do you have any suggestion? Thanks

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.