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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahdoucch03
Contributor
Contributor

Get sum sales of last Year in the same month

hello friends, i m trying to do a dashboard where i can get sum of sales by yearMonth and last yearMonth

this screen can explain more my demand :

  sales this year % sales last Year
mai-22 100.000$ -20.8%

126.300$

juin-21 150.000$ -14.9% 176.300$
juil-20 140.000$ -15.8% 166.300$
Labels (1)
1 Reply
justISO
Specialist
Specialist

Hi, first you need to convert your yearMonth to just Month (and separately Year if needed) to have common dimension for this. From there it is quite ease to get your MoM sales comparison, you just add Month dimension as first column and separate measures for calculations, where they can be like this

sum({<Year='2022'>} sales) / sum({<Year='2021'>} sales) -1

if you have only sales by month and year separated, or just

sum(sales_this_year) / sum(sales_last_year) -1

if you have only month for separation.