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

How can I calculate the aggregation?

Hi

 

I ahve a table like this 

 

Group  Team  Countofstories   stories completed

AA          1             20                    30

AA          2             45                    25

BB           4             65                    48

BB           5             15                    30

 

How can do an divide agregation by "Group" using the last two measures?  For example for Group AA  agreagate the two teams sum--something like this : 20+45/30+25

 

Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

Measure =
  DIVIDE(
    CALCULATE([Measure1],ALLEXCEPT([Group]),
    CALCULATE([Measure2],ALLEXCEPT([Group]),
    0
  )


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

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

Measure =
  DIVIDE(
    CALCULATE([Measure1],ALLEXCEPT([Group]),
    CALCULATE([Measure2],ALLEXCEPT([Group]),
    0
  )


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

Thanks for the answer.. I tried to use it by replacing my original dax query but I am getting this error. after line 3 was the original dax query that I needed to rewrite.

Jhon_0-1632359215649.png

 

@Anonymous, this is a fine approach but you'll need to clean up the syntax a bit to add missing parenthesis and table name references.

 

Ratio =
DIVIDE (
    CALCULATE ( [Count of stories],  ALLEXCEPT ( Table1, Table1[Group] ) ),
    CALCULATE ( [Stories completed], ALLEXCEPT ( Table1, Table1[Group] ) ),
    0
)

 

Anonymous
Not applicable

Thanks for the answer.. I tried to use it by replacing my original dax query but I am getting this error. after line 3 was the original dax query that I needed to rewrite.

 

Jhon_1-1632359279343.png

 

Your BLANK() is inside the last CALCULATE. That's what the syntax error is about.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.