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: 
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 (1)
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))