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

Calculate median with count

I need calculate median.

I wrote this code, but this sums the MY_BOOK_ID. 
=median({<[YEAR] = {2005}>} MY_BOOK_ID)

I need to count the MY_BOOK_ID, so I wrote the code as

=median({<[YEAR] = {2005}>} count(MY_BOOK_ID))

but this does not work.

Can anyone help me?

Thank you

Labels (2)
1 Reply
lironbaram
Partner - Master III
Partner - Master III

hi 

you need the median for which dimension 

for example: assuming your dimension is customer 

you could do 

median({<[YEAR] = {2005}>} aggr(count(MY_BOOK_ID),Customer))