Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

2 statements within set analysis not counting both statements

Hello

I was wondering if someone could kidnly help me

I have some set analysis eith 2 statements within it

The statement will only count one or the other, and not both together.  Could someone kindly cast an eye over my code and let me know why I only ever get either a count for Today's date or a count for when the data source is MAIN_BREACHES

=Count({<data_source_breaches={'MAIN_BREACHES'}>}{<QuarterlyBreaches_End_Date={"$(=Date(Now()))"}>} QuarterlyBreaches_Attendance_ID)


Kind Regards

Helen

1 Solution

Accepted Solutions
Nicole-Smith

=Count({<data_source_breaches={'MAIN_BREACHES'}, QuarterlyBreaches_End_Date={"$(=Date(Now()))"}>} QuarterlyBreaches_Attendance_ID)

View solution in original post

5 Replies
Nicole-Smith

=Count({<data_source_breaches={'MAIN_BREACHES'}, QuarterlyBreaches_End_Date={"$(=Date(Now()))"}>} QuarterlyBreaches_Attendance_ID)

atafsson
Creator
Creator

Hi Helen,

Type your SET-analysis like this instead:

=Count({<data_source_breaches={'MAIN_BREACHES'}, QuarterlyBreaches_End_Date={"$(=Date(Now()))"}>}QuarterlyBreaches_Attendance_ID)


You don't need the " {< >} " between every statement in the set-analysis. If you have more than one filter in the set-analysis just type " , " between them.


Sum({<Field1 = {'Datafield1'}, Field2 = {'Datafield2'}, Field3 = {'Datafield3'}>}Sales)


Regards

Axel

Not applicable

Hi Helen,

Do you mind trying this formula

=Count({<data_source_breaches={'MAIN_BREACHES'}, QuarterlyBreaches_End_Date ={"=$(=Date(Now()))"}>}

QuarterlyBreaches_Attendance_ID)


I just included comma between the two parameters which would act as AND (both needs to be true) and also a '=' before $ when calculating today's date.


Hope it helps.


Thanks

AJ

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

try with this in order to get a union of both sets of data:

=Count({<data_source_breaches={'MAIN_BREACHES'}> + <QuarterlyBreaches_End_Date={"$(=Date(Now()))"}>}QuarterlyBreaches_Attendance_ID)


regards

helen_pip
Creator III
Creator III
Author

Hello

Thank you very much for your help

This works a treat for me

Thanks

Helen