Forum Discussion
How to slice a summarized table?
Hi,
I am trying to slice an aggregated table I created using the summarize function but am unable to do so. Data is as follows:
Source:
Job #.........Revenue..........Group
1 100 Group A
1 50 Group A
2 125 Group A
3 200 Group B
Summary table = (SUMMARIZE(Source,Source[Job #],"Revenue",SUM(Source[Revenue]))
Job #.........Revenue.........Group
1 150 (????)
2 50
3 125
How do I pull the string data into the summary table so I can slice it? It won't let me create a relationship on Job # between the summary table and the data table "because one of the columns must have unique values."
Any help would be very much appreciated!
Thanks
Just add additional arguments:
SUMMARIZE(<table>, <groupBy_columnName>[, <groupBy_columnName>]…[, <name>, <expression>]…)
Read more here:
https://msdn.microsoft.com/en-us/library/gg492171.aspx
So in your case,
Summary Table = (SUMMARIZE(Source,Source[Job #], Source[Group],"Revenue",SUM(Source[Revenue]))
3 Replies
- dkay84_PowerBIMicrosoft Employee
Just add additional arguments:
SUMMARIZE(<table>, <groupBy_columnName>[, <groupBy_columnName>]…[, <name>, <expression>]…)
Read more here:
https://msdn.microsoft.com/en-us/library/gg492171.aspx
So in your case,
Summary Table = (SUMMARIZE(Source,Source[Job #], Source[Group],"Revenue",SUM(Source[Revenue]))
- v-sihou-msftMicrosoft Employee
In this scenario, since your records are group on Job only, so other columns need to group by Job columns. I think you should also make Group column as GroupbyColumn.
Summary table = (SUMMARIZE(Source,Source[Job #],Source[Group],"Revenue",SUM(Source[Revenue]))
Otherwise you have to use CONCATENATEX() function to combine the text together.
Regards,
- jl20Helper IV
Thanks all, I guess I was adding the argument in the wrong order.