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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

error in expression

Hello guys

Is there any thing wrong with this expression,

i took two straight table ,one on top and other at bottom

the top table has dimension :name1 and there related expression

so the requirement was,when i select a value from the name1 field then  that selected value related qm_score has to display on the bottom straight table ,else if  none value are selected from the top table .......the bottom table should show either 0 or empty space

to achieve the above task i wrote this expression ,unfortunately it throwing me an error

if(GetSelectedCount(name1)>0,FirstSortedValue({<ROLE={'SELF_EVALUATOR'}>}QM_SCORE, -DATE_OF_REVIEW,0 )

thanks

naveen

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Sorry, missed your IF error (no closing brace). Try:

if(GetSelectedCount(name1)>0,

    FirstSortedValue({<ROLE={'SELF_EVALUATOR'}>}QM_SCORE, -DATE_OF_REVIEW)

)

View solution in original post

3 Replies
tresB
Champion III
Champion III

Try like:

if(GetSelectedCount(name1)>0,FirstSortedValue({<ROLE={'SELF_EVALUATOR'}>}QM_SCORE, -DATE_OF_REVIEW)

i.e - remove '0' (sort-weight is expected >0)

kunkumnaveen
Specialist
Specialist
Author

Hello Tresesco

i tried ur expression....but its says ERROR IN EXPRESSION

if(GetSelectedCount(name1)>0,FirstSortedValue({<ROLE={'SELF_EVALUATOR'}>}QM_SCORE, -DATE_OF_REVIEW)

tresB
Champion III
Champion III

Sorry, missed your IF error (no closing brace). Try:

if(GetSelectedCount(name1)>0,

    FirstSortedValue({<ROLE={'SELF_EVALUATOR'}>}QM_SCORE, -DATE_OF_REVIEW)

)