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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tricky question?


Hi ,

i have data for jan 2013 sales is 100  and dec 2013 sales is 1200 , remining  feb,mar,....oct,nov i dont have

but my req is

i want see the data for 

jan is 100

feb is 100

mar is   200(jan+feb)

apr is   400(jan +feb+mar)

like this i want till dec(jan+....+dec)  .

i have to do this in script level only not in chart level using accumulation.

how ?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Sales:

Load

  Date#(Month,'MMM') as Month,

  Sales Inline

[

  Month, Sales

  Jan, 100

  Feb, 200

  Mar, 300

  Apr, 400

  May, 500

  Jun, 600

  Jul, 700

  Aug, 800

  Sep, 900

  Oct, 1000

  Nov, 1100

  Dec, 1200

];

Final:

Load

  Month,

  Sales,

  RangeSum(Peek('TotalSales'),Sales) as TotalSales

Resident Sales

Order By Month;

DROP Table Sales;

View solution in original post

10 Replies
MK_QSL
MVP
MVP

Use RangeSum, Above Functions in script...

Anonymous
Not applicable
Author

can u give me a expression

Not applicable
Author

Hi,

Can you plz provide the code

MK_QSL
MVP
MVP

Sales:

Load

  Date#(Month,'MMM') as Month,

  Sales Inline

[

  Month, Sales

  Jan, 100

  Feb, 200

  Mar, 300

  Apr, 400

  May, 500

  Jun, 600

  Jul, 700

  Aug, 800

  Sep, 900

  Oct, 1000

  Nov, 1100

  Dec, 1200

];

Final:

Load

  Month,

  Sales,

  RangeSum(Peek('TotalSales'),Sales) as TotalSales

Resident Sales

Order By Month;

DROP Table Sales;

Not applicable
Author


Hi Manish,

but here we have Jan and Dec in Month field,we dont have Feb to Nov values in Month field.

Not applicable
Author

Hi,

Sales:

Load

  Date#(Month,'MMM') as Month,

  Sales Inline

[

  Month, Sales

  Jan, 100

  Dec, 1200

];

Sales1:

Load

  Date#(Month,'MMM') as Month,

  Sales Inline

[

  Month, Sales

Feb, 0

  Mar,0

  Apr, 0

  May,0

  Jun, 0

  Jul, 0

  Aug, 0

  Sep, 0

  Oct, 0

  Nov, 0

];

Final:

Load

  Month,

  Sales,

  RangeSum(Peek('TotalSales'),Sales) as TotalSales

Resident Sales

Order By Month;

MK_QSL
MVP
MVP

Cant get you... can you please be more specific, with example?

Not applicable
Author


Actually here we have Like this

Tab:

Month Sales

Jan     100

Dec     1200

But here the requirement is we have data like this

Tab:

Month, Sales

  Jan, 100

  Feb, 200

  Mar, 300

  Apr, 400

  May, 500

  Jun, 600

  Jul, 700

  Aug, 800

  Sep, 900

  Oct, 1000

  Nov, 1100

  Dec, 1200

So here I added the Feb to Nov values using inline table with all sales value is 0.

is there any another way to achieve it?

Anonymous
Not applicable
Author

month filed is having only jan and dec sales .

no feb,mar...nov

here we have to create inline to get names of feb ,mar,....nov  and we need to do the accumlation as  above i said