Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try count({<Medal_type={'Gold'}>} Medal_type)
Try count({<Medal_type={'Gold'}>} Medal_type)