Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Function, number and set analysis

Hi

I have a set analysis with some parameters and one of them affects the result to not give the correct answear.:

     Class = {'=$(=Right(%Val_ChoiceClass,1))'}

If I change "Right(%Val_ChoiceClass,1)" to Class={6} I get the correct answer. How do I express that "Right(%Val_ChoiceClass,1) " to be a numeric value in the set expression

Thanks 🙂

1 Solution

Accepted Solutions
rubenmarin

So, the exact representation of Class={6} is:

Class={$(=Right(%Val_ChoiceClass,1))}

I think it should work like yours but you lost nothing to try.

View solution in original post

7 Replies
arulsettu
Master III
Master III

can you post your whole expression

Not applicable
Author

Try the following

Class = {$(=CONCAT(DISTINCT RIGHT(%Val_ChoiceClass,1),','))}

rubenmarin

Hi you can create a Text Box with the expression "=Right(%Val_ChoiceClass,1)" and check if this really returns '6'.

If %Val_ChoiceClass should have a different value por row, it wouldn't work, set analisys is calculated for the whole table, not row by row, If this is the case you can use if(Right(%Val_ChoiceClass,1)='6', ....

Not applicable
Author

I've checked with a text box and I get 6 back 😞

I can post the hole expression later today when I get to my computer

rubenmarin

So, the exact representation of Class={6} is:

Class={$(=Right(%Val_ChoiceClass,1))}

I think it should work like yours but you lost nothing to try.

Not applicable
Author

Sum({$<School={'Highschool'}, FLAG_defaultClass={1}, Class = {'=$(=Right(%Val_ChoiceClass,1))'}>}Grade*_Flag_Grade_Value)

If I change {'=$(=Right(%Val_ChoiceClass,1))'}>} to 6 i get the correct answer


Thank's for the suggestions

Not applicable
Author

Thank's Ruben that one worked