1 Reply Latest reply: Sep 2, 2016 4:50 AM by Gysbert Wassenaar RSS

    qlik master item measure and chart

    Jana Roy

      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