It will be depend from your datamodel but I think you will need to merge all neccessary fields into a single table. But why want you this transfer into the script - especially these kind of expressions is often better used within the gui and not in the script. If you have already problems with your performance you will rather need a different approach in your datamodel.
I have merged alle necessary fields into one table. The challenge here the fact that I want the second SCANNING.Umsatz substracted from the first SCANNING.Umsatz.
What I want is a dimension like
if (S_Artikel.Statistik = 'yes' or S_Artikel.KontenGruppe = 'UMSCN', 'Teilegruppenstatistik') as S_Artikel.Dimension
In future I want to build a cascaded if-clause, where I can refer to some possible variations in a listbox.
As I said, the challenge here is that the second part of the if-clause (S_Artikel.KontenGruppe = 'UMSCN') is substracted from the first part (S_Artikel.Statistik = 'yes')
Perhaps I can provide a sample-qvw.