Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
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 (3)
1 Solution

Accepted Solutions
lironbaram
Partner
Partner

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
Partner

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

sfbi
Creator
Creator
Author

perfect! thank you!