Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Year and Previous Year Issue - Set Analysis

Hello all,

I'm having an issue on set analysis regarding Year and Previous Year.

I have 2 KPIs:

- 1 shows the number of student for the year selection

-1 shows the number of student for the year selection - 1 year.

The issue I have is when I select a year I have the same number for both KPIs.

Year Selection KPI:

count(distinct ${<[Calendar_Year]={$(=max([Calendar_Year]))},[ClassStatus]={'Registered'},[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

Year Selection-1 year KPI:

count(distinct ${<[Calendar_Year]={$(=max([Calendar_Year])-1)},
[ClassStatus]={'Registered'},
[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

I try to identify what is wrong with my set analysis but cannot see.

Bruno

 

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Creator II
Creator II

The dollar in front of the set analysis is incorrect. Try this:

Year Selection KPI:

count(distinct {<[Calendar_Year]={$(=max([Calendar_Year]))},[ClassStatus]={'Registered'},[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

Year Selection-1 year KPI:

count(distinct {<[Calendar_Year]={$(=max([Calendar_Year])-1)},
[ClassStatus]={'Registered'},
[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

View solution in original post

3 Replies
Highlighted
Creator II
Creator II

The dollar in front of the set analysis is incorrect. Try this:

Year Selection KPI:

count(distinct {<[Calendar_Year]={$(=max([Calendar_Year]))},[ClassStatus]={'Registered'},[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

Year Selection-1 year KPI:

count(distinct {<[Calendar_Year]={$(=max([Calendar_Year])-1)},
[ClassStatus]={'Registered'},
[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

View solution in original post

Highlighted
Creator II
Creator II

HI Gentleman,

Please try below one.
Year Selection KPI:

count(distinct {<[Calendar_Year]={'=$(=max([Calendar_Year]))'},[ClassStatus]={'Registered'},[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

Year Selection-1 year KPI:

count(distinct {<[Calendar_Year]={'=$(=max([Calendar_Year])-1)'},[ClassStatus]={'Registered'},
[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])
Highlighted
Contributor II
Contributor II

Hello Tim,

Thank you very much for your inputs. It works well 😀.

Bruno