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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Aggregation problem in calculated column

EDIT: Link to PBIX-file: ShopInfo

 

Hi all!

 

I could use some help wrapping my head around the following issue:

 

I have three tables in my model:

 

model.JPG

 

They look like:

 

tables.JPG

Now I've created the following table using these tables:

 

result.JPG

Now, I want another column in this table that will divide the number of Employees over the YearlySales. So..

 

ProductIDEmployeesYearlySalesYearlySales per Employee
348103000300
348203000150
34850300060
53251000200
532101000100
92451500300
924101500150
92420150075
92450150030

 

In the table, I have ticked the 'Don't Summarize' options for the columns 'Employees' and 'YearlySales'.

 

But as I try to create a measure or calculated column in the ShopInfo-table which just divides both values, the formula editor requires me to enforce some kind of aggregation (max, min, sum, etc...) before being able to include the YearlySales. Which in turn messes up the calculation.. 😞

 

Any ideas on how to solve this? I'm even questioning if I should create a measure or calculated column. Help is very much appreciated. 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Right, if you use a measure, you will need to use an aggregation, just use MAX if your output is a table visualization.

If your output that you show is an actual table, you can create a calculated column and not have to use aggregation.


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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Link to PBIX-file: ShopInfo 

Measure = MAX('Products'[YearlySales]) / MAX('ShopInfo'[Employees])
 
As I stated in my original reply, you need to use a measure and when using a measure, you need to use an aggregation and I indicated that you should likely go with MAX.
 
PBIX is attached but it is updated to latest version.
 


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...
Anonymous
Not applicable

Help!? 😭

Greg_Deckler
Community Champion
Community Champion

Right, if you use a measure, you will need to use an aggregation, just use MAX if your output is a table visualization.

If your output that you show is an actual table, you can create a calculated column and not have to use aggregation.


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...
Anonymous
Not applicable

My output is supposed to be an actual table, just as I showed in the initial question.

 

When I create a calculated column (within any of the included tables), I still run into the issue of having some type of aggregation.

 

  • In Products, I can use 'YearlySales', but not 'Employees' in my DIVIDE(...) formula (or even using the '/' operator) without aggregating it first.
  • In Shops, I can't use either 'YearlySales' nor 'Employees' in my DIVIDE(...) formula (or even using the '/' operator) without aggregating them first.
  • In ShopInfo, I can use 'Employees', but not 'YearlySales' in my DIVIDE(...) formula (or even using the '/' operator) without aggregating them first.

In all cases, whenever I use MAX(...), MIN(...), SUM(...), AVERAGE(...) to aggregate the field that 'needs' aggregation, I don't get the result I need.. 😞

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors