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: 
pittouti
Contributor II
Contributor II

Formula in count Condition

Hello,

 

i have this formula for a Bar chart:

Count({<[AAA]={'Oui'},[BBBB]={'FR'}>} [XXX])

I would like to integrate this formula into the conditions:

weekname (DateA) = weekname (DateB)

like this :

Count({<[AAA]={'Oui'},[BBBB]={'FR'},weekname (DateA) = weekname (DateB)>} [XXX])

but it does not work

4 Replies
Anil_Babu_Samineni

Try like this?

Count({<[AAA]={'Oui'},[BBBB]={'FR'}>} If(weekname (DateA) = weekname (DateB), [XXX]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PriyankaShivhare
Creator II
Creator II

may be like this

create field for week

weekname (DateA) as WeekA

weekname (DateB) as WeekB

Count({<[AAA]={'Oui'},[BBBB]={'FR'},WeekA = {"=WeekA =WeekB")}>} [XXX])

or 

create a flag

if(WeekA =WeekB,1,0) as Flag

Count({<[AAA]={'Oui'},[BBBB]={'FR'},Flag = {1}>} [XXX])

 

Thanks,

Priyanka

pittouti
Contributor II
Contributor II
Author

I think I misspoke

il would like the final results

demande.PNG

PriyankaShivhare
Creator II
Creator II

Do a left join

Table1:

Load week,

             NB2

Source tb1

Left join(Table1)

Table2:

Load Week,

          NB

Source tb2

 

Thanks,

Priyanka