Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Set

Hi All,

Iam trying to executive the below expression this is not working

Iam facing difficulties ..

Please correct me ....

..

=if(NOT MATCH([When Found],'(ST) System Test','(CVT) Customer Validation Test','(FFT) Feature Function Test','(RT) Regression Test'),count(distinct{ <LoadDate = {"$(=Max(LoadDate))"}>}Key))

1 Solution

Accepted Solutions
sunny_talwar

May be create a flag in the script....

If(Match([When Found], '(ST) System Test', '(CVT) Customer Validation Test', '(FFT) Feature Function Test', '(RT) Regression Test'), 0, 1) as Flag

and then use this

=Count(DISTINCT {<LoadDate = {"$(=Max(LoadDate))"}, Flag = {1}>} Key)

View solution in original post

4 Replies
sunny_talwar

Try this

=Count(DISTINCT {<LoadDate = {"$(=Max(LoadDate))"}, [When Found] -= {'(ST) System Test', '(CVT) Customer Validation Test', '(FFT) Feature Function Test', '(RT) Regression Test'}>} Key)

smilingjohn
Specialist
Specialist
Author

Hi Sunny ,

look this is how i get this with red mark

As shown in the figure redalert.PNG

Why is this highlighted in red alert ????

Is this a wrong way of writing

smilingjohn
Specialist
Specialist
Author

Hi Sunny ,

In counts.PNG this expression should also count the blank values present in the When found field..

Currently it is excluding the blank values of When found Field.

Please find the attachment of the screenshot .. of the field whenfound .. here you can see there is only production present and rest are blank .

i want to count that also ..

how do i do this with the existing expression ..

=count(distinct {<LoadDate = {"$(=Max(LoadDate))"},[When Found] -= {'(ST) System Test','(CVT) Customer Validation Test','(FFT) Feature Function Test','(RT) Regression Test'}>}Key)

sunny_talwar

May be create a flag in the script....

If(Match([When Found], '(ST) System Test', '(CVT) Customer Validation Test', '(FFT) Feature Function Test', '(RT) Regression Test'), 0, 1) as Flag

and then use this

=Count(DISTINCT {<LoadDate = {"$(=Max(LoadDate))"}, Flag = {1}>} Key)