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: 
NickHoff
Specialist
Specialist

Set Analysis two QV Functions

This one should be easy, i'm just struggling with the correct syntax.

I have the following set which works correct:

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=LEN(SurgicalSupplyItemCode) = 6"}>}

I'm looking to add the following to it

IsNum(SurgicalSupplyItemCode)<>0

I've tried the following:

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=LEN(SurgicalSupplyItemCode) = 6"},IsNum(SurgicalSupplyItemCode)<>0 >} SurgicalSupplyItemCode)

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=LEN(SurgicalSupplyItemCode) = 6"},IsNum(SurgicalSupplyItemCode)-=0 >} SurgicalSupplyItemCode)

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=LEN(SurgicalSupplyItemCode) = 6"},{"IsNum(SurgicalSupplyItemCode)<>0"} >} SurgicalSupplyItemCode)

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=Len(SurgicalSupplyItemCode) = 6 and IsNum(SurgicalSupplyItemCode) <> 0"}>} SurgicalSupplyItemCode)


or


=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=Len(SurgicalSupplyItemCode) = 6 and IsText(SurgicalSupplyItemCode)"}>} SurgicalSupplyItemCode)

View solution in original post

5 Replies
trdandamudi
Master II
Master II

May be this:

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=LEN(SurgicalSupplyItemCode) = 6"},IsNum(SurgicalSupplyItemCode)<>{0} >} SurgicalSupplyItemCode)

NickHoff
Specialist
Specialist
Author

Gives error in expression by the <> i switched to -= and still same thing

sunny_talwar

May be this:

=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=Len(SurgicalSupplyItemCode) = 6 and IsNum(SurgicalSupplyItemCode) <> 0"}>} SurgicalSupplyItemCode)


or


=Count(DISTINCT {$<SurgicalSupplyItemCode = {"=Len(SurgicalSupplyItemCode) = 6 and IsText(SurgicalSupplyItemCode)"}>} SurgicalSupplyItemCode)

NickHoff
Specialist
Specialist
Author

Thanks Sunny!  Didn't realize i could use AND int the SET.

sunny_talwar

This is a search string where we are checking if the two conditions are met. This is a little different from the regular set analysis we use.

Look here: A Primer on Set Analysis

Capture.PNG