Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have an issue of syntax with formula COUNT if two conditions. My formula is :
=Count({$<DocSource>}{$<POT={'Paid on Time'}>}{$<[MonthName(PaymentDate)]={"$(=MonthName(Today()))"}>}DocSource)
1. First condition is : POT ='Paid on Time'
2. Second condition is : MonthName(PaymentDate) = MonthName(Today())
But when I run, Only second condition is running. The first condition is ignored
Please help with the correct syntax
Thanks in advance.
Hi @cmutombo
Try like below
Count({<PaymentDate={">=$(=MonthStart(Today()))<=$(=MonthEnd(Today()))"},POT={'Paid on Time'}>}DocSource)
Thanks a lot MayilVahanan
regards,
Hi MayilVahanan
I come again to you with this formula :
=Sum({$<[DATE_]= {"$(=Date(Today()-1))"},SERVICE={'VOICE'}>}REVENUE)
For a sum if :
1. DATE_ = Yesterday
2. SERVICE = "VOICE"
I don't have a good result. Is the syntax good ?
Thanks in advance.
Hi @cmutombo
Might be, ur date format is different.
=Sum({$<[DATE_]= {'$(=Date(Today()-1,'YYYY-MM-DD'))'},SERVICE={'VOICE'}>}REVENUE)
-- change ur date format respectively. And also, check whether u have data yesterday or not.
Please close the ticket by marking correct answer / like. so that, it helps other for similar issue.
Hi MayilVahanan
Yes, I have data in my data base
But, Qlik say : Errors in Expression :
=Sum({$<[DATE_]= {'$(=Date(Today()-1,'YYYY-MM-DD'))'},SERVICE={'VOICE'}>}REVENUE)
I am agree with you to change Today() format.
regards,
MayilVahanan
I found the good format, but syntaxes issue still continue :
1. =Sum({$<date( date#(DATE_,'M/D/YYYY h:mm:ss TT','M/DD/YYYY'))= {"$(=Date(Today()-1))"},SERVICE={'VOICE'}>}REVENUE)
or
2. =Sum({$<[DATE_]= {"$(=date( date#(date(Today()-1), 'M/DD/YYYY') , 'M/D/YYYY h:mm:ss TT')"},SERVICE={'VOICE'}>}REVENUE)
Both of two are failed. May be for syntaxes (special characters)
Hi MayilVahanan
this is the correct way
MANY THAAAANKS !!
=Sum({$<[DATE_]={"$(=timestamp(date(today()-1)))"},SERVICE={'VOICE'}>}REVENUE)
Hi @cmutombo
Can you close the thread by marking correct answer..
Yes, I can, But how to do it ?