Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

niharika1234
Contributor

Set analysis

Hello,

I am trying this Set Analysis. My logic is I want to count all distinct Incident that are open more that 21 days f Report date of incident . %DayId is my Report date of Incident . Please suggest . I believe there is some error in Set analysis.

count ( {<%DayId > {%DayId+21}>}distinct MOR_IncidentId)

Niha

5 Replies
MVP & Luminary
MVP & Luminary

Re: Set analysis

How do you know if an incident is still open? The report date of incident only tells us when it was opened.


talk is cheap, supply exceeds demand
Highlighted
jeshwanth19
Contributor II

Re: Set analysis

Try the below expression

Count({<%DayID={">%DayID+21"},Status={'Open'}>}distinct MOR_IncidentID)

Here Status should be your Incident Status.

niharika1234
Contributor

Re: Set analysis

Thanks.

niharika1234
Contributor

Re: Set analysis

Thanks.

Luminary
Luminary

Re: Set analysis

Hi,

I assume that you compare the report date of incident with today, so I'd try this:

count ( {<%DayId={"<=$(=Today()-21)"}>}distinct MOR_IncidentId)

This will select all incidents which were reported 21 days ago or earlier, so you also need to account for "open" incidents (as Gysbert mentions, you did not specify how you define an open incident).