Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rekhagrramadas
Contributor
Contributor

Exclude 0 from median calculation

I have to exclude 0 from median calculation, my expression looks like below, my annul_new column can come as 0, so I have already made as Null() in the data load editor. but still when its divided by annul_new its coming as 0, which comes in the median calculation

Median(Aggr(Sum({<flag_deal={'-11'},flag_productivity={'TMO_Productivity'}>}(deal_revenue_productivity/1000)/annul_new), median_key))

1 Solution

Accepted Solutions
rubenmarin


Hi, have you tried to keep the zero and exclude in set analysis?:

Median(Aggr(Sum({<flag_deal={'-11'},flag_productivity={'TMO_Productivity'},annul_new={">0<0"}>}(deal_revenue_productivity/1000)/annul_new), median_key))

View solution in original post

3 Replies
rubenmarin


Hi, have you tried to keep the zero and exclude in set analysis?:

Median(Aggr(Sum({<flag_deal={'-11'},flag_productivity={'TMO_Productivity'},annul_new={">0<0"}>}(deal_revenue_productivity/1000)/annul_new), median_key))

rekhagrramadas
Contributor
Contributor
Author

Thanks for your reply, let me try that and get back to you

rekhagrramadas
Contributor
Contributor
Author

Thank you @rubenmarin that worked!