Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

After adding script on reduce the file size , how to know it will not affect the report ?

Hi All

Recently i want to make my QVW file size below 25 Mb. So i add below script into my QVW file. it work fine and can reduce the file size to what i want.

NewFilteredTable:

NOCONCATENATE

LOAD *

RESIDENT sales WHERE

  Year_n < 4

DROP TABLES sales;

But the issue is it affect some of the report on sales vs target , the target amount become zero.

For this case Lucky for me i only make one changes. and since the target amount all become zero , i know it is due to add above script. Otherwise i will not be able to figure why ?

My question is after adding new script , how to know it will create any side effect ? Or how to prevent this kind of problem from happening again ?

Paul

1 Solution

Accepted Solutions

Re: After adding script on reduce the file size , how to know it will not affect the report ?

try this

money(

SUM({<Year_n, year = {'$(=Max(year))'}, month = {"<=$(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today()))))"}>}sales_target/$(Columndim89)/1000)

, $(vMoneyFormatK))

13 Replies
prma7799
Honored Contributor III

Re: After adding script on reduce the file size , how to know it will not affect the report ?

You can create copy of your original file and do the changes in copy file you will get changed or side effect.

For target could you please share some sample data with us.

paulyeo11
Valued Contributor II

Re: After adding script on reduce the file size , how to know it will not affect the report ?

Hi PM

If you manually select Year_n = 1 2 and 3 , the target data become zero.

Paul Yeo

prma7799
Honored Contributor III

Re: After adding script on reduce the file size , how to know it will not affect the report ?

Failed to open this document

Re: After adding script on reduce the file size , how to know it will not affect the report ?

You can exclude the year_n selection, if you don't want

money(

SUM({<Year_n, year = {'$(=Max(year))'}, month = {"<=$(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today()))))"}>}sales_target/1000)

, $(vMoneyFormatK))

paulyeo11
Valued Contributor II

Re: After adding script on reduce the file size , how to know it will not affect the report ?

I have try your expression , but it return zero.

Re: After adding script on reduce the file size , how to know it will not affect the report ?

try this

money(

SUM({<Year_n, year = {'$(=Max(year))'}, month = {"<=$(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today()))))"}>}sales_target/$(Columndim89)/1000)

, $(vMoneyFormatK))

paulyeo11
Valued Contributor II

Re: After adding script on reduce the file size , how to know it will not affect the report ?

Still not working.

Re: After adding script on reduce the file size , how to know it will not affect the report ?

It's working in my application

Re: After adding script on reduce the file size , how to know it will not affect the report ?

Capture.JPG