Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
micheledenardi
Specialist II
Specialist II

retrive total year sales

Hi,

in my report i have lots of records that represent any sales of many years.

how can i sum equal product,year and months record and compare it  with the sales of current year of the same product/months and obtain a % with the difference between the values ?

es.

product1: sales of first 4 months of 2014: 10€

product1: sales of first 4 months of 2015: 15€

result: +50% of last year sales for product1

thank's

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

2015 First 4 MONTHS

SUM({<Year=, Month= , Quarter=, Date = {">=$(=YearStart(Today()))<=$(=AddMonths(YearStart(Today()),3))"}>}Sales)

2014 First 4 MONTHS

SUM({<Year=, Month= , Quarter=,  Date = {">=$(=YearStart(Today(),-1))<=$(=AddMonths(YearStart(Today(),-1),3))"}>}Sales)

Result

Num((Column(1)-Column(2))/Column(2),'#0.00%')

View solution in original post

1 Reply
MK_QSL
MVP
MVP

2015 First 4 MONTHS

SUM({<Year=, Month= , Quarter=, Date = {">=$(=YearStart(Today()))<=$(=AddMonths(YearStart(Today()),3))"}>}Sales)

2014 First 4 MONTHS

SUM({<Year=, Month= , Quarter=,  Date = {">=$(=YearStart(Today(),-1))<=$(=AddMonths(YearStart(Today(),-1),3))"}>}Sales)

Result

Num((Column(1)-Column(2))/Column(2),'#0.00%')