Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table with the following:
GROUP | CODE | SALES | MEDIAN |
---|---|---|---|
12 | 1 | 29284,6 | - |
12 | 2 | 9230,8 | - |
12 | 3 | 18461,5 | - |
12 | 4 | 63907,7 | 8.769 |
12 | 5 | 7292,3 | - |
12 | 6 | 6553,8 | - |
12 | 7 | 7376,9 | - |
12 | 8 | 11076,9 | - |
12 | 9 | 6769,2 | - |
12 | 10 | 8307,7 | - |
16 | 26 | 9461,5 | - |
16 | 27 | 10984,6 | 9.342 |
16 | 28 | 8461,5 | - |
16 | 29 | 9223,1 | - |
17 | 30 | 17076,9 | 15.077 |
17 | 31 | 12923,1 | - |
17 | 32 | 15076,9 | - |
I calculate the MEDIAN as an expression in my table as: AGGR(MEDIAN(SALES),GROUP). This is for every GROUP.
The thing is that I only get the value for 1 from the GROUP and I'd need to fill the nulls with the same value for the GROUP.
Like this:
GROUP | CODE | SALES | MEDIAN | |
---|---|---|---|---|
12 | 1 | 29284,6 | 8.769 | |
12 | 2 | 9230,8 |
| |
12 | 3 | 18461,5 |
| |
12 | 4 | 63907,7 | 8.769 | |
12 | 5 | 7292,3 |
| |
12 | 6 | 6553,8 |
| |
12 | 7 | 7376,9 |
| |
12 | 8 | 11076,9 |
| |
12 | 9 | 6769,2 |
| |
12 | 10 | 8307,7 |
| |
16 | 26 | 9461,5 | 9.342 | |
16 | 27 | 10984,6 | 9.342 | |
16 | 28 | 8461,5 | 9.342 | |
16 | 29 | 9223,1 | 9.342 | |
17 | 30 | 17076,9 | 15.077 | |
17 | 31 | 12923,1 | 15.077 | |
17 | 32 | 15076,9 | 15.077 |
How can I do that directly on my simple table?
Thanks
Yes!!! Thank you very much! Worked like a charm!
To get the Median value fixed without getting affected by selections from other fields, should I add the following?:
AGGR(MEDIAN({<FIELD1=,FIELD2=,FIELD3=>} total <GROUP>SALES),GROUP,CODE)
Or do you know any other way instead of specifying all the fields to omit?
Thanks again!
Hi,
if you wish to ignore all field selection u can simply use Set identifier 1 or only specific field then use FIELD1= like that
=count({1<CODE= {"=sum(SALES) >= Aggr(Median(Total <GROUP>SALES),GROUP,CODE)"} > } CODE)
Thanks,Deva