Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am migrating qlikview to qliksense
this is qlikview expression
in qlikview is working properly
i rewrite the code as below
above sfilter is the variable of user selected date in num format but it not filtering the condition (<=$(sfilter)) starting date to posting date instead it return all the row (postingdate) in the table . it is not applying the filter completely.
When writing a expression in QS you often see a kind of preview of the measure in the bortom of that expression input box. Does that preview look as you would expect? If not then adress those issues.
It is har do be specific not seeing your variable definition. Is it a static value or a field name or an expression?
If it is a field name, does the field name have spaces in it? If so then try to add square brackets around the dollar expansion, like this: [$(sfilter)]
G'day,
I'm reviewing ChatGPT 4.1 at present so thought your question would be a candidate for testing it's code capabilities. Below is a response from the model... Let me know if it fits/works for you...
Summary of Issues Migrating from QlikView to Qlik Sense
Set Analysis Syntax:
In your expression, the set analysis brackets were sometimes missing or misplaced ([PostingDate] instead of <[PostingDate]>).
Variable Expansion:
In Qlik Sense, variables in set analysis need $(=sfilter) for numeric/date variables, not $(sfilter) (which just expands as a string).
Conditional Logic:
The original logic was impossible:
if(X < 1 AND X < -30, ...)
A value can’t be less than both 1 and -30 at the same time. Most likely you meant “between -30 and 1”:
if(X < 1 AND X > -30, ...)
Set Analysis Only Pre-filters:
Remember: set analysis selects records before calculation.
Your if() conditions further filter which records are summed but only within the set.
Corrected Qlik Sense Expression
See attached formatted text