Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
AnkitaC
Contributor II
Contributor II

monthly sales comparision

Hi All,

how to write expression for sales comparison like

jan2021   jan 2022    growth%   feb2021  feb2022   growth% til…..dec 2021   dec 2022    growth%

 

expression for that

 

please check attach screen shot for reference need to create that type of dashboard  if suggest expression for that.

 

 

regards ,

ankita

 

1 Reply
vikasmahajan
MVP
MVP

Hi Ankita,

Please link master calendar in your model as per following code:

MasterCalendar:
LOAD
    OrderDate AS OrderDate,
    WEEK(OrderDate) AS Week,
    YEAR(OrderDate) AS Year,
    MONTH(OrderDate) AS Month,
    DAY(OrderDate) AS Day,
    WEEKDAY (OrderDate) AS Weekday,
    'Q' & CEIL(MONTH(OrderDate) / 3) AS Quarter,
    DATE(MONTHSTART(OrderDate), 'MMM-YYYY') AS MonthYear,
    WEEK(OrderDate) & '-' & YEAR(OrderDate) AS WeekYear ;

 

Load
  Date(MinOrderDate+IterNo()-1) as OrderDate
While MinOrderDate+IterNo()-1  <= MaxOrderDate;
  
LOAD
    Date(MIN(FieldValue('OrderDate',recno()))) AS MinOrderDate,
    Date(MAX(FieldValue('OrderDate',recno()))) AS MaxOrderDate
autogenerate FieldValueCount('OrderDate');

 

use following set analysis to show CY &LY & growth%

https://community.qlik.com/t5/QlikView-Documents/Set-Analysis-for-certain-Point-in-Time/ta-p/1482626

https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-App-Prior-Period-Comparison-with-Set-A...

After this you will be able to create chart.

 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.