Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
marcoyukon
Not applicable

Conditional Measure Expression

Is it possible to switch to another expression based on a variable value ?

Example

Measure Expression P_COUNT:


= IF (v_IsClosed = "Yes")       

     COUNT( { $< [P.Type]=, DateType= { 'Closed' }> } P_Id )  

ELSE       

     COUNT( { $< [DateType]={ 'Ref' }> } P_Id )


..Is there a workable solution to this ?

1 Solution

Accepted Solutions
sunny_talwar
Not applicable

Re: Conditional Measure Expression

May be this

If(v_IsClosed = 'Yes', Count({$<[P.Type], DateType = {'Closed'}>} P_Id), Count({$<[DateType] = {'Ref'}>} P_Id)

3 Replies
sunny_talwar
Not applicable

Re: Conditional Measure Expression

May be this

If(v_IsClosed = 'Yes', Count({$<[P.Type], DateType = {'Closed'}>} P_Id), Count({$<[DateType] = {'Ref'}>} P_Id)

marcoyukon
Not applicable

Re: Conditional Measure Expression

Yes, thanks.

sunny_talwar
Not applicable

Re: Conditional Measure Expression

Please close the thread if you got what you wanted.

Best,

Sunny