Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i've tried to read other threads/questions and cannot quite get it correct. I'm pretty new to Qlik,forgive me if my terms are imprecise. my I'm trying to calculate a median for an expression that contains a sum.
a sample of my underlying data looks like this.
End Date | PrintName | UnitCost | NumberRX | QTY |
4/25/2019 | ACETAMINOPHEN 325MG TAB | 0.0053 | 5 | 500 |
4/25/2019 | ALLOPURINOL 300MG TAB | 0.0628 | 2 | 60 |
4/25/2019 | ALLOPURINOL 300MG TAB | 0.0787 | 1 | 30 |
4/25/2019 | ALLOPURINOL 100MG TAB | 0.042 | 3 | 90 |
4/25/2019 | AMITRIPTYLINE HCL 50MG TAB | 0.1799 | 1 | 30 |
5/27/2019 | BUPROPION HCL 150MG 12HR SA TAB | 0.0695 | 3 | 90 |
5/27/2019 | BENZOYL PEROXIDE 5% (WATER BASED) GEL | 0.1155 | 1 | 60 |
5/27/2019 | BUPROPION HCL 150MG 24HR SA TAB | 0.216 | 3 | 90 |
5/27/2019 | BUPROPION HCL 300MG 24HR SA TAB | 0.2247 | 2 | 60 |
5/27/2019 | CALCITRIOL 0.25MCG CAP | 0.3164 | 1 | 15 |
5/27/2019 | CAPSAICIN 0.025% CREAM | 0.035 | 1 | 60 |
5/27/2019 | CLINDAMYCIN PHOSPHATE 1% TOP GEL | 1.1303 | 1 | 30 |
5/27/2019 | CLONIDINE HCL 0.1MG TAB | 0.0139 | 1 | 60 |
6/23/2019 | FLUOXETINE HCL 20MG CAP | 0.0182 | 7 | 330 |
6/23/2019 | FOLIC ACID 1MG TAB | 0.0558 | 5 | 150 |
6/23/2019 | FUROSEMIDE 20MG TAB | 0.004 | 1 | 60 |
6/23/2019 | FUROSEMIDE 40MG TAB | 0.0269 | 3 | 120 |
6/23/2019 | FUROSEMIDE 80MG TAB | 0.074 | 2 | 60 |
6/23/2019 | FLUOXETINE HCL 10MG CAP | 0.0202 | 1 | 30 |
6/23/2019 | FLUTICASONE PROP 50MCG 120D NASAL INHL | 6.12 | 1 | 1 |
6/23/2019 | FLUTICASONE PROP 50MCG 120D NASAL INHL | 2.96 | 10 | 10 |
6/23/2019 | FENOFIBRATE 54MG TAB | 0.2009 | 1 | 15 |
i have the data aggregated by ENDDATE, again here is a sample
End Date | sum(NumberRX) | Median |
4/25/2019 | 80913 | ? |
5/27/2019 | 81040 | ? |
6/23/2019 | 78227 | ? |
7/27/2019 | 91562 | ? |
What i am looking for a is an expression to find the median of the "sum(NumberRX)"
Thanks for everyone's help.
Thank you for bearing with me with my foibles and imprecise explanations, the script works great!