Hi,
How can I do a median in Pigment ?
Thanks
Hi,
How can I do a median in Pigment ?
Thanks
Hi Alexandre,
We don’t have a function for calculating the median right now, but you can calculate it by combining a few modifiers and functions in a formula like the one below:rev2eRANK(rev2, Month, ASC, Sequential) IN (ROUNDDOWN((rev2eREMOVE COUNT: Country] + 1) / 2):ROUNDUP((rev2eREMOVE COUNT: Country] + 1) / 2))])REMOVE AVG: Country]
It might look a little complex, but see the below example to see it in action. We are calculating the median of the revenue across all countries for a given month.
Hopefully you can leverage this example for your own modelling :)
Cheers,
Hi, thank you for the tips! :)
Hey
Are you aware of any ways to accomplish something like this?
EDIT: I believe I was able to find what I needed in the article on the RANK function, using a unique dimension property along with the “&” symbol to reset across multiple dimensions. Thanks again for providing this example
Thanks,
Already have an account? Login
Single Sign-On Need help?
Login with Saml2 Log in with your Pigment accountEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.