3 Replies Latest reply: Feb 12, 2018 7:54 AM by Marom Mishan RSS

    Compare Months to each other on Qlik Sense

    Marom Mishan

      Hi All


      I need to make a comparison of months by day using a line chart. The user should be able to click on the yearmonth field to pick the months that they want to compare. (each year-month will be a different line)


      The x-axis will contain day numbers i.e., 1 to 31.

      The y-axis will contain sales (cumulative daily so on day 1 it will show amount of sales made on day 1 of each month selected, on day 2 it will show the sales for day 1 + sales for day 2 for each month selected, etc)


      Thank you in advance for your advice.

        • Re: Compare Months to each other on Qlik Sense
          Digvijay Singh

          It would be great if you can share the sample app, hope you have used master calendar in your script to create day/month fields etc.

            • Re: Compare Months to each other on Qlik Sense
              Marom Mishan

              Thanks for a quick response.

              I do have a master calendar:


                DECLARE FIELD DEFINITION Tagged ('$date')


                Dual(Year($1), YearStart($1)) AS [Year] Tagged ('$axis', '$year'),

                Dual('Q'&Num(Ceil(Num(Month($1))/3)),Num(Ceil(NUM(Month($1))/3),00)) AS [Quarter] Tagged ('$quarter'),

                Dual(Year($1)&'-Q'&Num(Ceil(Num(Month($1))/3)),QuarterStart($1)) AS [YearQuarter] Tagged ('$axis', '$yearquarter'),

                Month($1) AS [Month] Tagged ('$month'),

                Dual(Year($1)&'-'&Month($1), monthstart($1)) AS [YearMonth] Tagged ('$axis', '$yearmonth'),

                Dual('W'&Num(Week($1),00), Num(Week($1),00)) AS [Week] Tagged ('$weeknumber'),

                Date(Floor($1)) AS [Date] Tagged ('$date');



              DERIVE FIELDS FROM FIELDS [Date], [pas.Date],[Loan Date], postingdate, loandate USING [autoCalendar] ;


              Screenshot (2).png

              My current attempts which are not working:

              //= sum({< [Date.autoCalendar.Date]= {">=$(=MonthStart(Today()))<= $(=MonthEnd(Today()))"}>} [Unique Subs])

              //Sum([Unique Subs])

              //Sum({$<[Date.autoCalendar.Month] = {='Month(today())'}>}[Unique Subs])


              Unfortunately I cannot share the rest of the app for legal reasons. Would still really appreciate the help