Forum Discussion
Groupby not working
Hello Community,
I feel like I have the code correct for this, but I am getting the "expression refers to multiple columns..." error.
What I am trying to do is to aggregate my orders (distinct) by the shipped price of all of the lines on the order. So simply, the total value of each order but aggregated. I need it for a very specific reason.
- Anonymous3 years ago
Hi Anonymous ,
If you create a calculated table, it should be able to output normally. It should be like:
ShippedOrdersALL_Query_Order Number Shipped Price xxx xxx xxx xxx ... ... If you want a calculated column or measure, GROUPBY returns a table instead of a scalar, so this error is returned.
You can also consider putting [Order Number] and [ShippedPrice] into the table vision and setting up don't summarize.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
1 Reply
- AnonymousNot applicable
Hi Anonymous ,
If you create a calculated table, it should be able to output normally. It should be like:
ShippedOrdersALL_Query_Order Number Shipped Price xxx xxx xxx xxx ... ... If you want a calculated column or measure, GROUPBY returns a table instead of a scalar, so this error is returned.
You can also consider putting [Order Number] and [ShippedPrice] into the table vision and setting up don't summarize.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data