Forum Discussion
Store measure output in new table
- 8 years ago
Hi SianM
Sorry. I was thinking that you were going to use a measure aggregate x measure (like sumx, countx, etc). Summarize function actually accepts a measure as an argument. So you could use
Summarizetest = SUMMARIZE ( Raw1, Raw1[Milestone Status], "Average", [Dynamic Range] )
Alternatively, you can use GROUPBY() and CURRENTGROUP() functions. Example:
Summarizetest = GROUPBY ( Raw1, Raw1[Milestone Status], "Average", AVERAGEX ( CURRENTGROUP (), [Dynamic Range] ) )More about these two functions at https://www.sqlbi.com/articles/nested-grouping-using-groupby-vs-summarize/
Hi SianM
Sorry. I was thinking that you were going to use a measure aggregate x measure (like sumx, countx, etc). Summarize function actually accepts a measure as an argument. So you could use
Summarizetest = SUMMARIZE ( Raw1, Raw1[Milestone Status], "Average", [Dynamic Range] )
Alternatively, you can use GROUPBY() and CURRENTGROUP() functions. Example:
Summarizetest =
GROUPBY (
Raw1,
Raw1[Milestone Status],
"Average", AVERAGEX ( CURRENTGROUP (), [Dynamic Range] )
)More about these two functions at https://www.sqlbi.com/articles/nested-grouping-using-groupby-vs-summarize/
Hi danextian,
Thank you for pointing me in the direction of Addcolumns & GroupBy! Turns out summarize was not what was needed. I have managed to obtain the result I was looking for using a combination of the above.
Thank you Anonymous for your help also, testing a few things really helped me understand more how both of these functions work.
This has been a huge relief to finally get working. Thank you again for taking the time to assist me. :smileyvery-happy:
Sian