Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Median with sum

So I have some values that I need to sum for each day and then extract median from all those sums.

For example:

10 January  = sum(1 4 5 8 7 4 6) = 35

15 January = sum(5 4 8 9 1 ) = 27

16 January = sum( 5 4 8 1 2 ) = 20

median(all those sums) = 27

I tried doing this:

Median (sum(IM)) but it did not return any results

Any advice? I can create a table with all the dates and sums, maybe there is a way to use that column from the table for median? Really stuck here, thanks

5 Replies
Not applicable
Author

I have this:

median(aggr(sum(IM), [Exchange])))

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can try this.

     median(aggr(sum({1<[IND] ={'I'}>}IM), [Exchange])))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

this way it does the sum of all IM, i think i need to incorporate date into this somehow so that it does sum for each date

any ideas? maybe i could do something in the script?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Post your example with sample data.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Where can I find out what "aggr(sum({1<[IND] ={'I'}>}IM), [Exchange]))" means so that I can drop medians into my tables and charts?