Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rcandeo
Creator III
Creator III

how to evaluate an expression?

Hi, I have some formulas that I need to bring me results. So I´m trying to find the correct comands with no sucess.

I´ve created an aplications only with these lines on script:

LOAD * INLINE [

    F1, F2

    A, (5*8)

    B, (2*1)

    C, (1+1)

];

Then I´ve create a table showing F1, F2 and these expression:

=$(=F2)

The problem is that my table only shows the result in the expression when I select something. It shows me NULL values it I intend to show all the records.

Any idea why?

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi,

It will work with this expression:

=Pick(Match(F2,$(=Chr(39)& Concat(F2, Chr(39) & ',' & Chr(39),F1) & Chr(39))),$(=Concat(F2,',',F1)))

Regards,

Sokkorn

View solution in original post

4 Replies
stevelord
Specialist
Specialist

I have a table that shows nulls for some records when I leave a particular field unselected, then shows values when I select something in that field.  In my case the field is called Source, and even though it is not in my straight chart, the straight chart is seeing a conflict in the record source and discards the record rather than show the most current version as it should.  I don't know why mine behaves that way, but it sounds like you have the same kind of something causing a conflict that resolves only when you select something in that field.  Not sure really how to fix it since I needed the particular field to select by if not to aggregate my table by...

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think the problem is that the =$(=F2) calculates once per chart, not on a row basis. So when there is only one value available for F2, it works, otherwise not.

There is an evaluate() function available in script that will allow you to evaluate the expressions. Or do you have to do the evaluation in the chart?

-Rob

Sokkorn
Master
Master

Hi,

It will work with this expression:

=Pick(Match(F2,$(=Chr(39)& Concat(F2, Chr(39) & ',' & Chr(39),F1) & Chr(39))),$(=Concat(F2,',',F1)))

Regards,

Sokkorn

rcandeo
Creator III
Creator III
Author

Hi, I couldn´t use this expression, but I became curious how to use it. Can you show me how please?