Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
erp_curaden
New Contributor II

Let variable returns String as field-attribute

I ran into another issue:

I was trying to assign a String to a "Let"-variable. However, whatever I try, it always returns the variable with "-quotes instead of ' (I use this variable in a "Where"-statement):

 

Example (in which $(currentCustomerEMail) is interpreted as a Field-value):

Let currentCustomerEMail='email@mail.com';

Load
Count(OrderEMail) As "NumberOfOrders"
Resident Order
Where $(currentCustomerEMail)='xyz';

 

Thanks for your help 😉

1 Solution

Accepted Solutions
Partner
Partner

Re: Let variable returns String as field-attribute

let's try using the below syntax:
Where '$(currentCustomerEMail)'='xyz';

View solution in original post

5 Replies
Partner
Partner

Re: Let variable returns String as field-attribute

what are you trying to do with that load?

erp_curaden
New Contributor II

Re: Let variable returns String as field-attribute

Hi Agigliotti,

This part of the code is contained within a loop. So I have a number of customers (IDs) and a series of dates (YearMonth) I'm looping through to get the count of orders for each timestamp (YearMonth).

Partner
Partner

Re: Let variable returns String as field-attribute

i don't understand  Where $(currentCustomerEMail)='xyz';
what does it means?
what is the logic behind this condition?

erp_curaden
New Contributor II

Re: Let variable returns String as field-attribute

I'm looping through a table of all orders, and I only want the ones where the Email address of the order table corresponds to the current customer in my loop.

Partner
Partner

Re: Let variable returns String as field-attribute

let's try using the below syntax:
Where '$(currentCustomerEMail)'='xyz';

View solution in original post