Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Total sales

Hi

I have Unit number , Date, Sales fields, I would like to calculated sum of sales for each unit number , from the minimum date of each department number to select no of months.

ex:   I have Unit 1 in the year 2004/jan/25 sale $100, for the same Unit on 2004/feb/21 I have sale say $200 and for the

  Unit 2 in the year 2006/<mar/25 sale $50, for the same Unit on 2007/Apr/19 I have sale say $250

now I would like to calculate a field on Date which will give me  First 2Month, 4monts, 6Month, .....>24Month.

if I select on first 2Months I would like to see

for Unit number 1  Sale 300

for Unit number 2  Sale 50

Can any one help on this.

Please find the sample data on attachment.

Thanks

John

23 Replies
Highlighted

I did not see any reference to Departmen number in your attached Excel file. Is that the same thing as Unit Number?

Highlighted
Not applicable

Sorry for my mistake, yes your correct that is Unit Number.

Highlighted

Another questions, I don't see Unit Number 1 and 2. I see them starting from 6 and the next one is 7511. Also you want to see sales for Dec-2015 and Jan-2016 when you are looking for a 2-Month view?

Highlighted
Not applicable

Thanks sunny for your response,

I have provided different test data in the excel, however to describe the problem I have taken two units as dummy data and provided expected result.

As per the Excel

For Unit 7511  for 2 Month View expected result would be 34808

For Unit 12420 for 2 Month View expected result would be 116.

Thanks.

John

Highlighted

Oh okay. That makes sense. Now the question still remains, which months would you want to see for First 2 month view? Dec-2015 and Jan-2016?

Highlighted
Not applicable

No Sunny , the requirement is

I need a filter  which contains  2Month, 4months, 6 Months.....>48Months as values, when i click on 2Months it has two show the first 2 months data from its minimum date [minimum date is different for each Unit].

for 7511  Sep, Oct 2014

for 12420 Dec 2013, Jan 2014.

Hope its clear, if not please let me know.

Highlighted

Check out the attached application. I created flag in the script to determine the First 2, 4, 6, 24 months and then I am using an inline table for selection.

Capture.PNG

Highlighted
Not applicable

No Sunny Wrong results.

for the Months view

For Unit 7511  for 2 Month View expected result would be 34808

For Unit 12420 for 2 Month View expected result would be 116.

Thanks for the Response.

Highlighted

For Unit 12420, I am seeing this:

Capture.PNG

How is it going to Sum to 4?