Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
turtle_qlikview
Contributor II
Contributor II

How to filter in expression when variable is used for dates?

I am using Variable to select dates in my expression on straight table.  sum($(vSETYTD) Sales). How can I apply filter to select a particular customer?

The below expression doesn't give me any results.

sum({<$(vSETYTD), Customer=-{'123','345'}>} Sales)

 

2 Solutions

Accepted Solutions
mfchmielowski
Creator II
Creator II

Hi

First thing is the value of the variable. Can You provide information about it ?

When you create an expression in straight table dont put label on in. You'll be able to see how the expression looks like. Will be good if you paste full expanded expression here.

View solution in original post

turtle_qlikview
Contributor II
Contributor II
Author

This is what I did and it worked: 

I expanded the variable and added the customer label to it. 

My Final Expression:

sum({$<Year={$(=max(total Year))}, MonthDayNo={"<=$(=max(total MonthDayNo))"},[Customer]={'123','345'},Month=,[Month Year]=,Quarter=,Date=,Week=,WeekNo=>}Sales)

 

View solution in original post

4 Replies
mfchmielowski
Creator II
Creator II

Hi

First thing is the value of the variable. Can You provide information about it ?

When you create an expression in straight table dont put label on in. You'll be able to see how the expression looks like. Will be good if you paste full expanded expression here.

View solution in original post

turtle_qlikview
Contributor II
Contributor II
Author

Variable vSETYTD is as below. Copied from variable overview :

{$<Year={$(=max(total Year))}, MonthDayNo={"<=$(=max(total MonthDayNo))"},Month=,[Month Year]=,Quarter=,Date=,Week=,WeekNo=>}

 

My current Expression is sum($(vSETYTD) Sales), to which I want to apply customer filter. 

 

 

mfchmielowski
Creator II
Creator II

With this SetExpression selecting customers in listbox will work.
Do i understand correctly: You want to add customer ids to this set dynamicaly ?

turtle_qlikview
Contributor II
Contributor II
Author

This is what I did and it worked: 

I expanded the variable and added the customer label to it. 

My Final Expression:

sum({$<Year={$(=max(total Year))}, MonthDayNo={"<=$(=max(total MonthDayNo))"},[Customer]={'123','345'},Month=,[Month Year]=,Quarter=,Date=,Week=,WeekNo=>}Sales)

 

View solution in original post