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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.