9 Replies Latest reply: Oct 29, 2018 8:45 AM by Avinash Chettipalli

# Problem with Qlik expression

Hi All,

I have table in Qlik sense. The table contains customer, Start date, Expiry date and CBM value.

Before filtering any selections its showing 42.66 Values. But after I am making selection its showing 47.11(correct value )

After I filtering, I am getting correct value. Before filtering I am getting different value.Below is the expression I wrote.

Please let me know what is the wrong.

Sum({<[acct_dt]={">=\$(=(Min(Date([Start Date of Rate Validity]))))<=\$(=(Min(Date([Expiry Date of Rate Validity]))))"},[Product Code]={'OFREXP'},[Sub Product Code]={'OFLCL'}>}CBM)

Thanks,

Siva

• ###### Re: Problem with Qlik expression

what field selections do you mean ?

• ###### Re: Problem with Qlik expression

Hi,

Before Selection Customer- Abc, TradeLine-US-IE and CBM Values is 42.66

But After Selection with above - CBM value is giving 47.11(Correct Value)

Thanks,

Siva

• ###### Re: Problem with Qlik expression

why do you think Values 42.66 is wrong ?

• ###### Re: Problem with Qlik expression

What are the selections?

• ###### Re: Problem with Qlik expression

There is no wrong in your expression, But if you want to show same number which after selecting. We can look? May be share application to test the same

• ###### Re: Problem with Qlik expression

Hi Anil,

Thanks,

Siva

• ###### Re: Problem with Qlik expression

Hi Team,

If I hot code the above expression like below its working fine as expected

Sum({<[acct_dt]={">=\$(=Date('05/01/2018'))<=\$(=Date('04/30/2019'))"},[Product Code]={'OFREXP'},[Sub Product Code]={'OFLCL'}>}CBM)

But When I am writing like below its not working.. Please suggest me what would be the wrong

Sum({<[acct_dt]={">=\$(=(Min(Date([Start Date of Rate Validity]))))<=\$(=(Min(Date([Expiry Date of Rate Validity]))))"},[Product Code]={'OFREXP'},[Sub Product Code]={'OFLCL'}>}CBM)

Thanks,

Siva

• ###### Re: Problem with Qlik expression

maybe this:

Sum( {< [acct_dt] = {">=\$(=Min(Date([Start Date of Rate Validity])))<=\$(=Min(Date([Expiry Date of Rate Validity])))"},

[Product Code] = {'OFREXP'}, [Sub Product Code] = {'OFLCL'} >} CBM )

I hope it helps.

• ###### Re: Problem with Qlik expression

Hi Andrea,

Sorry, I am getting result like previously.

Thanks,

Siva

• ###### Re: Problem with Qlik expression

Hi siva,

I believe it should be the case of Date format or min function before date format.

try something like the below:

Sum({<[acct_dt]={">=\$(=(Date(Min([Start Date of Rate Validity]),'MM/dd/YYYY')))<=\$(=(Date(Min([Expiry Date of Rate Validity]),'MM/dd/YYYY'')))"},[Product Code]={'OFREXP'},[Sub Product Code]={'OFLCL'}>}CBM)

Good luck

AVinash

• ###### Re: Problem with Qlik expression

Hi,

We have issue with [acct_dt] is not in Date format. How Can I make [acct_dt] as date format in this expression.

Thanks,

Siva