Forum Discussion
Error on SubTotal and GrandTotal calculation
- 6 years ago
Hi,
Please try these measures:
UNIT_QTY = SUMX ( GROUPBY ( 'Table', 'Table'[CHANNEL], 'Table'[SERVICE], 'Table'[MODEL], 'Table'[CODE] ), CALCULATE ( AVERAGE ( 'Table'[QTY] ) ) )AVG PRICE = SUMX ( GROUPBY ( 'Table', 'Table'[CHANNEL], 'Table'[SERVICE], 'Table'[MODEL], 'Table'[CODE] ), CALCULATE ( AVERAGE ( 'Table'[PRICE] ) ) )The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto
Thanks for your feedback!
I have replaced the function GROUPBY with SUMMARIZE to be used in my PowerPivot table and it works
I'm also trying to get the same result by creating a KEY field and for each unique KEY I have to add the PRICE...
I'm new on this DAX functions...
So I'm looking for something like: "For each unique KEY take the PRICE"
Thanks a lot for your great support!
Hi,
You can still use GROUPBY function in Excel PowerPivot, see this:
Best Regards,
Giotto
- lucausa756 years agoFrequent Visitor
Thanks for your example.
This is what happens to me when I add GROUPBY function in my PowerPivot:
Thanks
- v-gizhi-msft6 years ago
Community Support
Hi,
It is related to the Excel version, please try to update your excel to the latest version.
Best Regards,
Giotto
- lucausa756 years agoFrequent Visitor
@ v-gizhi-msft
I have Excel 2013; do I have to install 2016 version?
About GROUPBY function I have replaced the function GROUPBY with SUMMARIZE; is it the same?
It has the same effect on my report?
Thanks