2 Replies Latest reply: Jun 1, 2017 6:03 AM by Michele De Nardi RSS

    how to use variables in Qlik Sense to compare sales for this year with previous year

    abdulaziz hassan aldabbagh

      Hi all , i would like to know how to use variables in Qlik Sense to compare sales for this year with previous year : for example there is 3 cases : 1- salesAmount  between first of this year until today VS Previous Year  2- sales amount this month VS same

       

      SET ThousandSep=',';

      SET DecimalSep='.';

      SET MoneyThousandSep=',';

      SET MoneyDecimalSep='.';

      SET MoneyFormat='$#,##0.00;($#,##0.00)';

      SET TimeFormat='h:mm:ss TT';

      SET DateFormat='M/D/YYYY';

      SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

      SET FirstWeekDay=6;

      SET BrokenWeeks=1;

      SET ReferenceDay=0;

      SET FirstMonthOfYear=1;

      SET CollationLocale='en-US';

      SET CreateSearchIndexOnReload=1;

      SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

      SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

      SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

      SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

       

       

      INVOICE:

      LOAD *,

      date(CREATED_DATE ,'MM/DD/YYYY') as INVC_CREATED_DATE,

      year (CREATED_DATE) as INVCYEAR,

      month (CREATED_DATE) as INVCMONTH,

      week (CREATED_DATE) as INVCWEEK,

      day (CREATED_DATE) as INVCDAYS;