Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Thank you
hi
add to your expression
avg({<YEAR=,product=p(product)>}aggr({<YEAR=>}interval(min({<YEAR=>} [DAEND])-min({<YEAR=>} [DABEG])), YEAR, NMCULTIVAR))
hi
add to your expression
avg({<YEAR=,product=p(product)>}aggr({<YEAR=>}interval(min({<YEAR=>} [DAEND])-min({<YEAR=>} [DABEG])), YEAR, NMCULTIVAR))
perfect! thank you!