Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
arvsuri007
Contributor II
Contributor II

Median of two separate columns - qlik sense

Hi all,

I need to get median between two columns and end result should be combined median of two columns A & B as shown below:

AB
34567
5567
4568
7543
776

 

End result should be 61.0. Please help.

I am facing almost the same scenario but the difference is I need to create those columns (as measures) and then do the median?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Add Aggr() with your dimensions within Concat

Concat(Aggr(YourExpression, YourChartDimensions), ',')

View solution in original post

12 Replies
sunny_talwar

Can you explain how are you arriving at 61 based on the data provided above? Median of A = 45 and Median of B = 68... right? How do you get to 61 from here?

arvsuri007
Contributor II
Contributor II
Author

Hi Sunny,

Sorry for late response,

I need a calculation so that it can calculate both the columns as combined one like below

A34
A55
A45
A75
A7
B567
B67
B68
B43
B76
Median61
sunny_talwar

And you need this output in a KPI object?

arvsuri007
Contributor II
Contributor II
Author

Correct.

sunny_talwar

Try this in a KPI object

=RangeFractile(0.5, $(=Concat(A, ',') & ',' & Concat(B, ',')))
arvsuri007
Contributor II
Contributor II
Author

Thanks 🙂 

Scenario here is ; I have calculated columns based on multiple conditions and if i store them as variable then what should be the calc.

 

Regards,

Arvind

sunny_talwar

Not sure I follow.

arvsuri007
Contributor II
Contributor II
Author

Hi Sunny,

See above columns (basically measures) are based on certain calculation ( includes functions; getfieldselection,getselectedcount&median). And if I am using your calculation to 'concat' then need to entertain that measure in place of columns A & B which shows me an error. So i created a variables for both measures, need to know if we can concat variables as per your calculation.

 

Regards,

Arvind

sunny_talwar

Add Aggr() with your dimensions within Concat

Concat(Aggr(YourExpression, YourChartDimensions), ',')