Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qlik master item measure and chart

Hi,

I am new to qlik. I was trying to do in sql following :

SELECT  Year , sum(case when Medal_type = 'Gold' then 1  else 0 end ) as gold_count

,sum(case when Medal_type = 'Silver' then 1  else 0 end ) as silver_count

,sum(case when Medal_type = 'Bronze' then 1  else 0 end ) as bronze_count

,(sum(case when Medal_type = 'Gold' then 1  else 0 end ))+(sum(case when Medal_type = 'Silver' then 1  else 0 end ))+(sum(case when Medal_type = 'Bronze' then 1  else 0 end )) as total

from [dbo].[ALL MEDALISTS]

where Gender like  'Women'

group by Year

order by Year asc

Can I use master item -> measure sum(aggr(if( Medal_type = 'Gold', 1, 0), Year) but it does not work in the bar-chart when I drag it

against country.

Any advice will be really helpful.

Thanks,

J

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try count({<Medal_type={'Gold'}>} Medal_type)


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

Try count({<Medal_type={'Gold'}>} Medal_type)


talk is cheap, supply exceeds demand