Discussion board where members can learn more about Qlik Sense App Development and Usage.
i'm trying to use reverse function in qliksense script but load fails (not supported function).
in the app as a calculated dimension it gives an error expression...
reverse(Field2) as Reverse_Field2 (is that the correct syntax)
There is no reverse function in qlik string functions.
See the link for the available string functions:
String functions ‒ Qlik Sense
Maybe you used this link as reference:
Reverse a value
But sense doesn't use macro as Qlikview.
As an alternative, you'd have to do in in code, something like the below script:
Load * Inline
I like Qlikview!
let vString = peek('Desc',0,'x');
let vLen = Len('$(vString)');
let vStringNew = '';
for i = 1 to Len('$(vString)')
vStringPart$(i) = Mid('$(vString)',$(i),1);
let i = Len('$(vString)');
let vStringNew = '$(vStringNew)' & '$(vStringPart$(i))';
trace $(vStringNew) $(i);
i = i -1;
loop while i > 0;
'$(vString)' as Original,
'$(vStringNew)' as Reversed
drop table x;
You could use the code i've done and use it as a sub called reverse to do this trick for you.
To achieve the following reversed string and get it to a table: