Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anononymous13
Contributor II
Contributor II

Exclude min value from Dimension

Hello Qlik experts ,

I am trying to create a chart to show the first appearance of a product in the market.

I used the expression =aggr({<[Year]=>}Min([Year]),[product]) in my Dimension to show all the products and their min year and the data on the bar chart appears correctly.

Now I would want to exclude the year '2015' from the Dimension and show only the products that appeared for the first time between 2016 to 2020, when I try to use the expression aggr({<[Year]=>}min({$<[Year]={'<>2015'}>} [Year]),[Product])

the values for 2015 and 2016 are adding up in the bar chart. Could anybody please help me with the issue.

 

 

1 Solution

Accepted Solutions
rubenmarin

Ok, I added a clause to ignore selections when calcualtes the min year of each product:

Count({<Year-={2015}>}Aggr(if(Min({1} TOTAL <product> Year)=Year, product), product, Year))

View solution in original post

4 Replies
rubenmarin

Hi, ycan you try this?: =aggr({<[Year]-={2015}>}Min([Year]),[product])

Or use a simple Year and product as dimensions and set the logic in expression:

Count({<Year-={2015}>}Aggr(if(Min(TOTAL <product> Year)=Year, product), product, Year))

Anononymous13
Contributor II
Contributor II
Author

Hello @rubenmarin ,

 

Thank you. Count({<Year-={2015}>}Aggr(if(Min(TOTAL <product> Year)=Year, product), product, Year)) works however when I select the Year filter , the values adds up again.

rubenmarin

Ok, I added a clause to ignore selections when calcualtes the min year of each product:

Count({<Year-={2015}>}Aggr(if(Min({1} TOTAL <product> Year)=Year, product), product, Year))

Anononymous13
Contributor II
Contributor II
Author

Thank you @rubenmarin , it works.