0 Replies Latest reply: Oct 10, 2017 12:24 PM by Simone Trabattoni RSS

    How can I click a measure with Valuelist() ?

    Simone Trabattoni

      Hi community,

      I'm studying the valuelist() function:

       

      ValueList - chart function ‒ Qlik Sense

       

      But I've a problem. After creating a table with that function, I cannot use the measures created as row of the dimension as a dimension occurrencies, i.e. using it as filters for example.

       

      What I'd like to have, it is a simple table with all the measures I want used as occurencies of a dimension and, selecting each "measure", see only it on a barplot.

       

      So I decided to create a table with all the measures I want, a barplot with them, using the nice valuelist(). But it is not working.

      Here my data:

       

      mov:

      Load*Inline

      [workerid,sale,type,year

      1,5,a,2016

      1,20,a,2016

      2,1,a,2016

      2,8,a,2017

      3,9,a,2016

      3,2,a,2017

      3,1,a,2017

      4,4,a,2017

      ];

       

      wor:

      Load* Inline

      [worker,workerid

      a,1

      b,2

      c,3

      d,4

      e,7

      q,9

      ]

      where Exists (workerid);

       

      Here my functions with valuelist in the table that is going to be the filter:

       

      dimension: =valuelist('Sum','Sum/TOTAL')

      measure:

      if(

         valuelist('Sum','Sum/TOTAL')='Sum'

         ,Sum(sale)

        ,if(valuelist('Sum','Sum/TOTAL') ='Sum/TOTAL'

         ,Sum(sale)/Sum(TOTAL {$<worker=>}sale)

      ))

       

      I've tried to slap in a aggr(), but it does not work and also it makes not sense to me, but maybe I'm wrong.

      The same in a barplot.

       

      What I'm doing wrong? Thanks in advance for your time, and the app is attached.