1 Reply Latest reply: Aug 30, 2016 8:12 AM by arul settu Branched from an earlier discussion. RSS

    Trying to compare two kpi's; switch between ytd, qtd, mtd and wtd

    Marcel Bültmann

      YTD,QTD,MTD,WTD IN Qlik Sense


      I have the same problem in sense. I am trying to compare two kpi's. I'd like to switch between ytd, qtd, mtd and wtd. I was very happy when i found this piece of code, but i still wasn't able to fix the problem in my app. So let's pretend i want to have mtd.


      Sum({<Year,Quarter,Month,Week, OrderDate = {"$(='>=' & Date(MonthStart(Max(OrderDate)), 'YourDateFieldFormatHere') & '<=' & Date(Max(OrderDate), 'YourDateFieldFormatHere'))"}>} Sales)


      • I switched OrderDate to Datum because that is the date i am refering to
      • What means 'YourDateFieldFormat'? After OrderDate = there is no syntax highlightnig, i have no idea.