Forum Discussion
Anonymous
6 years agoNot applicable
Group by order
I have a table looking like this: I would like to group all the orders and then have the max of precision per order. Which mean I will get a report like this: How would you write such...
- 6 years ago
You really do not need a measure for this, just create a table visualization and then use the default Max aggregation on your precition column. So ordre and precition in the table visualization.
- 6 years ago
Hi, Anonymous
Based on my research, you may create a measure as below.
Sum of Max = SUMX( ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[order] ), "Max", CALCULATE( MAX('Table'[precition]), FILTER( ALL('Table'), 'Table'[order] = EARLIER('Table'[order]) ) ) ), [Max] )Result:
You can also create a calculated table as below
NewTable = ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[order] ), "Max", CALCULATE( MAX('Table'[precition]), FILTER( ALL('Table'), 'Table'[order] = EARLIER('Table'[order]) ) ) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
v-alq-msft
6 years agoCommunity Support
Hi, Anonymous
Based on my research, you may create a measure as below.
Sum of Max =
SUMX(
ADDCOLUMNS(
SUMMARIZE(
'Table',
'Table'[order]
),
"Max",
CALCULATE(
MAX('Table'[precition]),
FILTER(
ALL('Table'),
'Table'[order] = EARLIER('Table'[order])
)
)
),
[Max]
)
Result:
You can also create a calculated table as below
NewTable =
ADDCOLUMNS(
SUMMARIZE(
'Table',
'Table'[order]
),
"Max",
CALCULATE(
MAX('Table'[precition]),
FILTER(
ALL('Table'),
'Table'[order] = EARLIER('Table'[order])
)
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly