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: 
sfbi
Creator
Creator

Set Analysis Hide Values

Hi,

I have this expression, it calculates the avg interval days between two dates, between all years disrespect of the selection, aggr by year and product (NMCULTIVAR). It give me the correct results as expected.

avg({<YEAR=>}aggr({<YEAR=>}interval(min({<YEAR=>} [DAEND])-min({<YEAR=>} [DABEG])), YEAR, NMCULTIVAR))

The problem is that I need to show this measure with other measure in a table with the products, but only products sold on selected years.
As Im using YEAR= to calculate the avg, the table is bringing all products sold ignoring the selected YEAR.

There is anyway to avoid showing all products on this table but at the same time use this measure to show the product avg interval.

example selectionexample selection

Thank you

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

add to your expression 

avg({<YEAR=,product=p(product)>}aggr({<YEAR=>}interval(min({<YEAR=>} [DAEND])-min({<YEAR=>} [DABEG])), YEAR, NMCULTIVAR))

 

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

add to your expression 

avg({<YEAR=,product=p(product)>}aggr({<YEAR=>}interval(min({<YEAR=>} [DAEND])-min({<YEAR=>} [DABEG])), YEAR, NMCULTIVAR))

 

sfbi
Creator
Creator
Author

perfect! thank you!