Forum Discussion
Anonymous
5 years agoNot 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. The end result:
v-easonf-msft
Community Support
5 years agoHi, 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
- Anonymous5 years agoNot applicableHi.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])ReturnSWITCH(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!