Forum Discussion
Group rows with same and different values.
- 3 years ago
hi Anonymous
try to create a calculated table like:
SumTable = ADDCOLUMNS( SUMMARIZE( TableName, TableName[Email], TableName[Dept Number] ), "Cost", CALCULATE(SUM(TableName[Cost])) )Also, in Power Query Editor, you can try to Groupby the query,
https://learn.microsoft.com/en-us/power-query/group-by
hi Anonymous
try to create a calculated table like:
SumTable =
ADDCOLUMNS(
SUMMARIZE(
TableName,
TableName[Email],
TableName[Dept Number]
),
"Cost",
CALCULATE(SUM(TableName[Cost]))
)
Also, in Power Query Editor, you can try to Groupby the query,
https://learn.microsoft.com/en-us/power-query/group-by
- Anonymous3 years agoNot applicable
That worked ! One more thing though im trying to add a date filter but Im getting an error that "," before cost is incorrect. Any Idea why?
DEFINE VAR MAveragePrice =
ADDCOLUMNS (
CALCULATETABLE (
SUMMARIZE ( 'Usage details amortized',
'Usage details amortized'[Tags - copy.DepartmentNumber],
'Usage details amortized'[Tags - copy.OwnerEmail]),
Usage details amortized'[Date])>= DATE ( 2022, 12, 01 ) &&
'Usage details amortized'[Date] <= DATE ( 2022, 12, 31 )
),
"Cost",
CALCULATE(SUM('Usage details amortized'[Cost])),
)
EVALUATE
MAveragePrice