2 Replies Latest reply: May 9, 2018 8:08 AM by Mazen Bilto RSS

    In a set analysis, getting a month and the month before it.

    Mazen Bilto

      Hello qlik community

       

      I have a problem that im suffering with and a senior of mine before me that struggled with it too. Currently on the April version im trying to do this in a set analysis

       

      Keep in mind that i have constructed a dat to look like this: if this was a date "3/25/2018 10:10:10 AM" it turns it to "3/2018" so only the month and the year

       

      KPI 1 (On this KPI i want to show the latest year and month in the data)

       

      some im writing something like this

       

      Count( {$<Month_Year = {'$(=Max(Month_year))'}>} ID) ----> this works

       

      KPI 2 (On this KPI i want to show the year and month prior to the selection in KPI 1)


      and for this one i try this


      Count( {$<Month_Year = {'$(=Max(Month_year) -1)'}>} ID) -----> this doesnt work


      Count( {$<Month_Year = {'$(=AddMonths(Max(Month_year), -1) )'}>} ID)  -----> this doesnt work either


      also any kind of month manipulation just doesnt work in set analysis. Note that these operations work in a Text/Image Chart and i verified that it can work. but in set analysis it doesnt.

       

      please help.

       

      Thank you