Qlik Community

Qlik Sense App Development

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

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
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 😉

Labels (5)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

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

View solution in original post

5 Replies
Highlighted
Partner
Partner

what are you trying to do with that load?

Highlighted
Contributor II
Contributor II

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).

Highlighted
Partner
Partner

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

Highlighted
Contributor II
Contributor II

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.

Highlighted
Partner
Partner

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

View solution in original post