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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors