Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How Do you count the number of flags using set analysis

Hi Everyone,

I have three flags in my script which capture wther a field is missing or not. if a field is missing it flags the field.

How do i use set analysis to count this fields

Check the script below but its not working

Count ({<Sites.CaptureAddressFlg = {'>(0)'},Sites.CapturesContactPersonFlg = {'>(0)'},Sites.CapturessFixedLineNumberFlg = {'>(0)'}>}lSite_ID)

if any of the fields is 1 it should count ISite_ID.

Please help,

Thanks,

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This should do the trick:

Count ({<Sites.CaptureAddressFlg = {1}> + <Sites.CapturesContactPersonFlg = {1}> + <Sites.CapturessFixedLineNumberFlg = {1}>} lSite_ID)

If that does not work, please be specific about what it is doing wrong. Better yet, post a sample app.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
MayilVahanan

HI

Try like this

= If((Sites.CaptureAddressFlg > 0) or (Sites.CapturesContactPersonFlg > 0) or (Sites.CapturessFixedLineNumberFlg > 0), Count(ISite_ID)

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi mayil ,

I have tried it and it doesnt seem to be working

MayilVahanan

HI

I think u using more than one dimension?

= If((Sum(Sites.CaptureAddressFlg) > 0) or (Sum(Sites.CapturesContactPersonFlg) > 0) or (Sum(Sites.CapturessFixedLineNumberFlg) > 0), Count(ISite_ID)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This should do the trick:

Count ({<Sites.CaptureAddressFlg = {1}> + <Sites.CapturesContactPersonFlg = {1}> + <Sites.CapturessFixedLineNumberFlg = {1}>} lSite_ID)

If that does not work, please be specific about what it is doing wrong. Better yet, post a sample app.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks alot Jonathan that worked perfect