Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 

Using Variable in Dynamic Expression

Hi All,

I have a very basic query which I am not able to figure out as to where I am doing wrong

In a chart expression I have following : Count({<[Actual Build End Date] = {"=Sum([Actual Build End Date]) > 0"}>}vActual) and it evaluates correctly as per my expectations. But I want a very dynamic expression.

Where vActual is defined as GetFieldSelections(Actual) and results in value selected from the inline table Actual and one of the selected value is [Actual Build End Date]. It means the value of  variable vActual is [Actual Build End Date].

I want to dynamically make expression of count such that it ignores all empty values from the field [Actual Build End Date]. There is one dimension called Week, which is not relevant here. My intention is that for the given week I want count of all rows in the field [Actual Build End Date] which has one or other date ignoring blanks.

Can you all help me by substituting my variable name in the main expression which is red in color. I hope I am clear in my query.


Manish Prasad

1 Reply

As per my understanding, you want to count the "Actual Build End Date" field and ignore the blanks, I think you can use the below in your script when you load the data:

Load ......,

           If(IsNull("Actual Build End Date") or "Actual Build End Date"='',0,1) as "Actual Build End Date Counter"

From ........

Then in your expression just use Sum("Actual Build End Date Counter")

Yousef Amarneh