Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Help with a SET

Hi

Would really value if someone can help me with this set. When I mark the year (fieldname Year) and month (fieldname Month) I get the result as in the first picture. What I want is a set-expression that distinct count the ID-field but only the ones that are releated to Enddate. In the lower pic I have manually marked the enddate in that way I would like the set to do.

/Thanks!

namnlös.JPG

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Help with a SET

Hi,

Try this expression

=Count({<EndDate=P(EndDate)>} DISTINCT ID)

Hope this helps you.  Can you attach the sample file.

Regards,

Jagan.

5 Replies
MVP & Luminary
MVP & Luminary

Help with a SET

Hi,

Try this expression

=Count({<EndDate=P(EndDate)>} DISTINCT ID)

Hope this helps you.  Can you attach the sample file.

Regards,

Jagan.

Not applicable

Help with a SET

Thanks. I´d also tried this,

=Count(({$<Enddate=P({1<ID={">1"}>}Enddate)>}ID)

It gave me the same result as yours but aint as nice as yours and can´t hold Distinct.

Help with a SET

Hi,

     Try something like this

     =Count({<EndDate={$(=Chr(39)&Concat(Distinct EndDate ,Chr(39) & ',' & Chr(39)) & Chr(39))}>} DISTINCT ID)

Celambarasan

Not applicable

Help with a SET

Hi Celambarasan, thanks. That also works. What does the (=Chr(39)&Concat(Distinct EndDate ,Chr(39) & ',' & Chr(39)) & Chr(39) means?

Help with a SET

Hi,

     It just replaces the selected date in single quotes like

     {'2011-12-30','2011-12-31'}

     Chr(39) is single quotes(')

Celambarasan