Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data-sales comparison

Hello everyone I would like to ask how can I do to solve the following problem . Sorry for my poor english.

I want to make a comparison between the amount sold in two periods ( months or years ) ; z=( x sales period ( less ) sales period y ) with x and y :

1 ) free      2 ) close\near times  .

thanks a lot for help.   

4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Stefano, you've got to explain it better!

Not applicable
Author

I make you a practical example.

1) I want to build to know the difference between the amount of goods sold: the field is composed MONTH_YEAR = (mm / yyyy)

Difference = quantity sold (January / 2014) - quantity sold (April / 2015) without having to set fixed parameters; each selected two dates from a list will change the value.

2)

Difference = quantity sold in January / 2015-quantity sold in January / 2014

Difference = quantity sold in February / 2015-quantity sold in February / 2014

same period previous year

Difference = quantity sold in March / 2015-quantity sold in February / 2015

Difference = quantity sold in February / 2015-quantity sold in January / 2015

same year previous period

thanks

I hope I was clear...:)

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Assuming that you create two variables - vMonthYear1 and vMonthYear2 and you let the user select the Months using a Calendar object or something similar, you can then use the two variables in Set Analysis. Something along these lines:

sum({<MonthYear = {$(vMonthYear1)}>} Sales) -

sum({<MonthYear = {$(vMonthYear2)}>} Sales)


You just need to make sure that the field MonthYear and the two variables are formatted in the same exact way.


cheers,

Oleg Troyansky

Come and learn Set Analysis and Advanced Aggregation with me at www.masterssummit.com - take your QlikView skills to the next level!

Not applicable
Author

hello. I'm testing what you told me but I do not work. I'll show you the size of my date;

general format..     which variable format i have to set ? vX1 e vX2 are the variables.

i used that formula

sum({<Month = {$(vX1)}>} [Sales Revenue]) - sum({<Month = {$(vx2)}>} [Sales Revenue])

thanks