Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Afernandes
Contributor II
Contributor II

Get unique values

Good morning everyone, I know that there are similar topics, but in no way did I find a solution to this question, which although it seems simple is giving me problems.

Summing up. I have two tables. In a table has C_ID (referring to the courses that a university has). In the other table there is the Anolectiv (referring to the period in question 2016/2017, 2017/2018 ... etc) what I wanted to count the number of new courses. That is to say only in the courses that are only associated with the last period. I have experimented with several formulas of set analysis. But I can never get only the new courses.

Can anyone give me an idea?

Thank you very much,

Labels (2)
2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Assuming the periods are string values, then something like:

Count({<Period = {'$(=MaxString(Period))'}> 
   - <Period -= {'$(=MaxString(Period))'}>} 
Distinct C_ID)

Its a little simpler if the periods are numerics or duals. To prevent this responding to selections, just add a 1<...> to the two qualifier clauses:

Count({1<Period = {'$(=MaxString(Period))'}> 
   - 1<Period -= {'$(=MaxString(Period))'}>} 
Distinct C_ID)
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Afernandes
Contributor II
Contributor II
Author

Thank you very much,

Solved my problem