Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
maurizio_masini
Contributor II
Contributor II

Barchart a count of distinct records YTD and Past year

Hi, I saw some similar questions & answers, but none was helping me... so thanks for helping.

I have a table with some records, N. and Type that I count distinct to chart, based on a date.

I'd like to have a bar chart that plots the count for each month (like I can do now) and also for the same month the previous year. I.e.

Untitled.png

My data is like:

N.TypeDate
1234A01/01/17
5678A01/01/16
8906A01/01/18
8906B01/02/18

So, the need of the distinct is because I want to count the same N. if a different type.

Any insight is appreciated.

Maurizio

1 Solution

Accepted Solutions
wdchristensen
Specialist
Specialist

Under sorting you might try using a custom expression like:

=MONTH([Date]) & '/' & YEAR([Date])

View solution in original post

2 Replies
wdchristensen
Specialist
Specialist

Under sorting you might try using a custom expression like:

=MONTH([Date]) & '/' & YEAR([Date])

zebhashmi
Specialist
Specialist

addmonths(date,-12)