Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Сount number by years

Hello! I'm new to Qlik and need some help.
I have three attributes: crossroad_id, value and year.

Crossroad_IDValue
Year
11002015
12002015
13002016
14002016
21002015
25002015
23002015


I need to count number of crossroads by years.
For example, final results should look like: 2 crossroads in 2015, 1 crossroad in 2016.

P.S. I need this to build a Bar Chart.

2 Replies
marcus_sommer

Year as dimension and count(distinct Crossroad_ID) as exprression.

- Marcus

jerryyang756
Creator
Creator

You can also do it in script...

Tab:

LOAD

count(DISTINCT Crossroad_ID) as Crossroad_ID, 

Year

FROM (ooxml, embedded labels, table is Sheet1)

Group By

Year;

Reload the data . Take Year as dimension and Only(Crossroad_ID) as expression.