Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all , need help , i have a set analysis like this:
=count({$<Date={ ">=$(=Date((Today()-30), 'YYYY.MM.DD')) <=$(=Date((Today()-0), 'YYYY.MM.DD'))" },OfferingCategory1={Narystės}>} DISTINCT SabID)
and i need to iplement If statment into set analysis, like this : {$<Abonement.End={ ">=$(=Date((Today()-60), 'YYYY.MM.DD')) <=$(=Date((Today()-30), 'YYYY.MM.DD'))" }>}
the logic is:
if {$<Abonement.End={ ">=$(=Date((Today()-60), 'YYYY.MM.DD')) <=$(=Date((Today()-30), 'YYYY.MM.DD'))" }>}
then
count({$<Date={ ">=$(=Date((Today()-30), 'YYYY.MM.DD')) <=$(=Date((Today()-0), 'YYYY.MM.DD'))" },OfferingCategory1={Narystės}>} DISTINCT SabID)
please help
Hi,
you can include the if expression in your count.
For example. you can use the below mentioned expression.
count({$< Abonement.End={ ">=$(=Date((Today()-60), 'YYYY.MM.DD')) <=$(=Date((Today()-30), 'YYYY.MM.DD'))" }
,Date={ ">=$(=Date((Today()-30), 'YYYY.MM.DD')) <=$(=Date((Today()-0), 'YYYY.MM.DD'))" },OfferingCategory1={Narystės}>} DISTINCT SabID)
-Nilesh
im not quite sure what your question is or what you want but try this:
if({$<Abonement.End={ ">=$(=Date((Today()-60), 'YYYY.MM.DD')) <=$(=Date((Today()-30), 'YYYY.MM.DD'))" }>},if({$<Date={ ">=$(=Date((Today()-30), 'YYYY.MM.DD')) <=$(=Date((Today()-0), 'YYYY.MM.DD'))" },OfferingCategory1={Narystės}>}, count(DISTINCT SabID)))
i need count all records where:
{$<Abonement.End={ ">=$(=Date((Today()-60), 'YYYY.MM.DD')) <=$(=Date((Today()-30), 'YYYY.MM.DD'))" }>}
in this set analysis :count({$<Date={ ">=$(=Date((Today()-30), 'YYYY.MM.DD')) <=$(=Date((Today()-0), 'YYYY.MM.DD'))" },OfferingCategory1={Narystės}>} DISTINCT SabID)
Nilesh, yours solution is working, but returns only 2 records, there must be more...
try this
if(num(Abonement.End)>=num(Date((Today()-60)) and num(Abonement.End)<= num(Date(Today()-30)),
count({< Date={ ">=$(=Date((Today()-30), 'YYYY.MM.DD')) <=$(=Date((Today()), 'YYYY.MM.DD'))" }
,OfferingCategory1={Narystės}>} DISTINCT SabID)