Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need to find the median for the below data set in a straight table in qlik sense
Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 |
20 | 40 | 10 | 6 | 34 | 45 | 21 |
Is Week a dimension or do you have different columns for each Week? If Week is a dimension, try
Median(Data)
otherwise try
RangeFractile(0.5, Week1, Week2, Week3, Week4, Week5, Week6, Week7)
Maybe a pivot with week as horizontal dimension would be more suitable and then you could use something like:
median(aggr(YourExpression, Week, FurtherDimensions))
If these weeks are all different fields I suggest a transforming with a CROSSTABLE statement whereby you could also do it with something like:
rangefractile(0.5, [Week 1], [Week 2], ...)
- Marcus
Is Week a dimension or do you have different columns for each Week? If Week is a dimension, try
Median(Data)
otherwise try
RangeFractile(0.5, Week1, Week2, Week3, Week4, Week5, Week6, Week7)
Maybe a pivot with week as horizontal dimension would be more suitable and then you could use something like:
median(aggr(YourExpression, Week, FurtherDimensions))
If these weeks are all different fields I suggest a transforming with a CROSSTABLE statement whereby you could also do it with something like:
rangefractile(0.5, [Week 1], [Week 2], ...)
- Marcus
Thanks its working .