Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anononymous13
Contributor II
Contributor II

Show bars only for distinct products not part of all the previous years

I am trying to create a bar chart which shows products that only appear in the given year and it did not appear in any of the previous years.  i.e., The year 2016 should only have 9 unique products and product 1 should only appear in year 2015.  Would it be possible to implement that in QLikview?

 

Anononymous13_0-1591728870425.png

 

Labels (3)
1 Solution

Accepted Solutions
vamsee
Specialist
Specialist

Created a flag based on the script level and used it in expressions

View solution in original post

5 Replies
raji6763
Creator II
Creator II

hi,

your data itself having product 1 appear for all years  .

Is there any column like product ID?

if the product id column appears in your data,then use it.

count(distinct Product ID)

regards,

raji

Anononymous13
Contributor II
Contributor II
Author

Product 1 appears in all years but I want it to only appear in the year it first appeared. i.e., all products should only appear in their min(year)

vamsee
Specialist
Specialist

Created a flag based on the script level and used it in expressions

Anononymous13
Contributor II
Contributor II
Author

Thank you. What if year is in different table and product in different table, how can I load the script by creating new column as key.

vamsee
Specialist
Specialist

I would suggest you create a temporary column Year in the fact table, which I assume is joined with the calendar table based on date