apply custom column formula to TOTAL in case of a group by? #2324
Unanswered
giftculture
asked this question in
Q&A
Replies: 1 comment
-
Perspective doesn't support this exactly, but for your particular use case I believe this is actually just a weighted mean, which is a built-in aggregate: {
"expressions":["\"profit\"/\"quantity\""],
"aggregates":{"\"profit\"/\"quantity\"":["weighted mean","quantity"]}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Let's say that I have the following data
date quantity profit pps (custom column, which is profit / quantity)
2023/08/01 100 10 0.10
2023/08/02 200 50 0.25
and then I aggregate by date
TOTAL 300 60 ???
Is there any way to have Perspective apply the custom column formula to the aggregate (which would then display pps for the TOTAL row as 60 / 300, or 0.20
Beta Was this translation helpful? Give feedback.
All reactions