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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make a single expression with certain condition


Hi,

I hv two expression given below i need it to convert into single expression with certain condition.

i hv two fields PeriodName and SEMName.

if i select PeriodName field values then expression(1) to be executed.

if i select SEMName field values then expression(2) to be executed.

(1)Sum ({$<PeriodName={'$(=FIELDVALUE('PeriodName', FIELDINDEX('PeriodName', ONLY(PeriodName))-1))'}>}Values)

(2)Sum ({$<SEMName={'$(=FIELDVALUE('SEMName', FIELDINDEX('SEMName', ONLY(SEMName))-1))'}>}Values)

Pls help me out

2 Replies
Not applicable
Author

Hi,

You can try this:


=If(GetFieldSelections(PeriodName) > 0, Expression1, if (GetFieldSelections(SEMName) > 0, Expression2 ) )


Not applicable
Author

Its not working..the values not displayed