Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference using the same expression in script | diagramm

Hello,
I'm comparing characters from two years with the <like> operator and using the same expression for it in diagramm (Diagrammformel) respectively in script (Skriptformel);
I want to have it in the script but this runs with an error also when I'm using the same expression by copying it from diagramm to the script.

Attached is an simple example of my problem.
Can anyone see the difference between diagramm | script. What I'm doing wrong?
Thanks for help. DJ

1 Solution

Accepted Solutions
Not applicable
Author

Hi

The problem her is that the x for O01F are on separate rows for the two columns.
And when you are doing the if, there are only one x, so you will not get the result "Beide Jahre".

What you have to do is one of the following:
1) group the rows together on the FPCOD4 with a group by or something then do the if.
2) do a resident load with the FPCOD4 with the two column repectivley and do a inner join on the first table, then do the if

BR
Hans

View solution in original post

3 Replies
Not applicable
Author

You are missing a comma in the resident load.

Load

*,

..........

/Michael

Not applicable
Author

Thank You,
sorry, that missing comma was my mistake when preparing this simple example and it works with an inline table.

I now extracted a more realistic example from my original QV-file where one sees the x | x constellation shows no text in the field <Skriptformel> but in <Diagrammformel>. See attached qv-file.
This phenomenon is the crux I'm not understanding and it prevents to integrate that workaround in the script level instead of diagram.
Anyone can see an solution?

Thanks. DJ (QV 8.50.626.1.5)

Not applicable
Author

Hi

The problem her is that the x for O01F are on separate rows for the two columns.
And when you are doing the if, there are only one x, so you will not get the result "Beide Jahre".

What you have to do is one of the following:
1) group the rows together on the FPCOD4 with a group by or something then do the if.
2) do a resident load with the FPCOD4 with the two column repectivley and do a inner join on the first table, then do the if

BR
Hans