Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

zagzebski
Contributor

Variable using quotes (") is not working when loaded

I am trying to get the variable to load correctly but I am having issues with quotes. I tried to use chr(34) but no success. chr(39) worked fine for apostrophes but can't figure out how to write variable so set expressions work for quotes.

VARIABLE:

vClaimsPYImpSiteMetroNoOther = '(sum({$ <
      [MI Imp Site Metro Regional DVC] = {"*"}-{'&Chr(39) & 'Other' &Ch(39) & '},
      [Incurred Year Month] = {"<=$(=Max([Incurred Year Month]-100))"},
      [Incurred Year] = {"$(=Max([Incurred Year]-1))"},
      [Paid YearMonth] = {"<=$(=Max([Paid YearMonth]-101))"}
>} [Claim Amt Allowed]))';

RESULT:

sum({$ <
  [MI Imp Site Metro Regional DVC] = {"*"}-{'Other'}
  [Incurred Year Month] = {"<="},
  [Incurred Year] = {""},
  [Paid YearMonth] = {"<="}
>} [Claim Amt Allowed])
)

Thanks in advance,

Zag

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Variable using quotes (") is not working when loaded

let vClaimsPYImpSiteMetroNoOther =

  'sum({$ <

       [MI Imp Site Metro Regional DVC] = {"*"}-{Other},

       [Incurred Year Month] = {"<=' & chr(36) & '(=Max([Incurred Year Month]-100))"},

       [Incurred Year] = {"' & chr(36) & '(=Max([Incurred Year]-1))"},

       [Paid YearMonth] = {"<=' & chr(36) & '(=Max([Paid YearMonth]-101))"}

  >} [Claim Amt Allowed])';

result is (ctrl+alt+V)

sum({$ <

       [MI Imp Site Metro Regional DVC] = {"*"}-{Other},

       [Incurred Year Month] = {"<=$(=Max([Incurred Year Month]-100))"},

       [Incurred Year] = {"$(=Max([Incurred Year]-1))"},

       [Paid YearMonth] = {"<=$(=Max([Paid YearMonth]-101))"}

  >} [Claim Amt Allowed])

View solution in original post

5 Replies
Partner
Partner

Re: Variable using quotes (") is not working when loaded

hi

not really clear what you want to achieve

what is the expected result you are after ?

zagzebski
Contributor

Re: Variable using quotes (") is not working when loaded

Liron -

basically this part of the variable needs to stay the same...

[Incurred Year Month] = {"<=$(=Max([Incurred Year Month]-100))"},

[Incurred Year] = {"$(=Max([Incurred Year]-1))"},

  [Paid YearMonth] = {"<=$(=Max([Paid YearMonth]-101))"}

but when loaded looks like this...

[Incurred Year Month] = {"<="},

  [Incurred Year] = {""},

  [Paid YearMonth] = {"<="}

MVP
MVP

Re: Variable using quotes (") is not working when loaded

let vClaimsPYImpSiteMetroNoOther =

  'sum({$ <

       [MI Imp Site Metro Regional DVC] = {"*"}-{Other},

       [Incurred Year Month] = {"<=' & chr(36) & '(=Max([Incurred Year Month]-100))"},

       [Incurred Year] = {"' & chr(36) & '(=Max([Incurred Year]-1))"},

       [Paid YearMonth] = {"<=' & chr(36) & '(=Max([Paid YearMonth]-101))"}

  >} [Claim Amt Allowed])';

result is (ctrl+alt+V)

sum({$ <

       [MI Imp Site Metro Regional DVC] = {"*"}-{Other},

       [Incurred Year Month] = {"<=$(=Max([Incurred Year Month]-100))"},

       [Incurred Year] = {"$(=Max([Incurred Year]-1))"},

       [Paid YearMonth] = {"<=$(=Max([Paid YearMonth]-101))"}

  >} [Claim Amt Allowed])

View solution in original post

zagzebski
Contributor

Re: Variable using quotes (") is not working when loaded

THanks! Although not sure why it worked. chr(36) is for the "$" sign. Why does that make it work?

Again - much apppreciated,

Zag

zagzebski
Contributor

Re: Variable using quotes (") is not working when loaded


dumb question - I understand now.

Thanks.