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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

sum a measure with grouping

Hi!

Just wondering if this is possible.  

I am attempting to sum the Category Rank Pts by Employee.
Category Rank Pts is a measure.

EA_EA_0-1624059894645.png

The end result:

EA_EA_1-1624060049653.png

 

 

7 REPLIES 7
v-easonf-msft
Community Support
Community Support

Hi,  @Anonymous 

Could you please tell me whether your problem has been solved?
You can also take a try formula as below:

Measure_category rank final =
VAR tab =
    ADDCOLUMNS (
        SUMMARIZE ( 'Table', 'Table'[Appr Header], 'Table'[Employee] ),
        "Category Rank final", [Category Rank final]
    )
RETURN
    SUMX ( tab, [Category Rank final] )

or 

Measure_category rank final = SUMX(VALUES('Table'[Appr Header]),[Category Rank final])

 

If it doesn't meet your requirement,please share your formula of "Category Rank Pts " for further research.

 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

Hi. 
The Category Rank Pts measure below.  
I am still having trouble summing up measures.
I tried using AddColumn to store the Category Rank Pts, but still unable to sum them up by employee.
 
Category Rank Pts =
VAR currentSubCat = max('Table'[Appr Header])

 

Return
SWITCH(
currentSubCat
, "PP"
, RANKX( FILTER( ALL( 'Table' ), 'Table'[Appr Header] = currentSubCat ), CALCULATE( sum('Table'[sumQty]) ),,ASC )*0.6
, "PA"
, RANKX( FILTER( ALL( 'Table' ), 'Table'[Appr Header] = currentSubCat ), CALCULATE( sum('Table'[sumQty]) ),,ASC )*0.2
, "INS"
, RANKX( FILTER( ALL( 'Table' ), 'Table'[Appr Header] = currentSubCat ), CALCULATE( sum('Table'[sumQty]) ),,ASC )*0.1
, "PT"
, RANKX( FILTER( ALL( 'Table' ), 'Table'[Appr Header] = currentSubCat ), CALCULATE( sum('Table'[sumQty]) ),,ASC )*0.1
)
 
Thanks!
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=SUMX(Data,[Category rank final])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi.

I was looking for the formula for the Category Rank Final as a sum of the Category Rank Pts measures by employee.
I added the Category Rank Pts measure in the thread.  Thanks.

Hi,  @Anonymous 

This is really strange, I may need you to provide a sample pbix file for further research.

 

Best Regards,
Community Support Team _ Eason

Hi,

Try this measure

SUMX(Data,[Category rank pts])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
aj1973
Community Champion
Community Champion

Hi @Anonymous 

use this measure

 

Category Rank Final_BIS =

VAR _EmployeeID = SELECTEDVALUE('TABLE'[Employee])

VAR _Result = CALCULATE(SUM('TABLE'[Category Rank Final]) , 'TABLE'[Employee] = _EmployeeID)

RETURN

_Result

 

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.