Forum Discussion
esmat
3 years agoRegular Visitor
summarize a table
Hi All,
I have a table with multi currency conversion factors, would like to summarize this table based on monthly average while maintaining all columns.
table is below
esmat
This is a calculated table not a measure
6 Replies
- johnt75Super User
You could use something like
Monthly summary = ADDCOLUMNS ( SUMMARIZE ( 'Currency table', 'Date'[Year month] ), "Avg USD", CALCULATE ( AVERAGE ( 'Currency table'[Value.USD] ) ), "Avg JPY", CALCULATE ( AVERAGE ( 'Currency table'[Value.JPY] ) ) )- esmatRegular Visitor
I got an error message as below
- tamerj1Community Champion
Hi esmat
Of course you need to include all other columnsSummary Table = GROUPBY ( ADDCOLUMNS ( 'Table', "Month Year", FORMAT ( 'Table'[Day], "MMM YYYY" ) ), [Month Year], "Value.USD", AVERAGEX ( CURRENTGROUP (), [Value.USD] ), "Value.JPY", AVERAGEX ( CURRENTGROUP (), [Value.JPY] ), "Value.BGN", AVERAGEX ( CURRENTGROUP (), [Value.BGN] ) )