Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

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

4 Replies
nilesh_gangurde
Partner
Partner


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

Not applicable
Author

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)))

Not applicable
Author

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...

er_mohit
Master II
Master II

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)