Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
from a list like below, material numbers could be repeated over the years. i want to pick out the new field value first time appeared in this year, say, 2018. i tried with expression like: if(Min(year)='2018', count(DISTINCT ([Material number])), but it doesn't work out, who can give some advices? thanks.
Try this?
if(year = Max(TOTAL year), count(DISTINCT ([Material number]))
Or
Count({<year = {$(=Max(year))}>} DISTINCT ([Material number])
@Anil_Babu_Samineni wrote:Try this?
if(year = Max(TOTAL year), count(DISTINCT ([Material number]))
Or
Count({<year = {$(=Max(year))}>} DISTINCT ([Material number])
Hi, the logic of above expression seems to be opposite to what i expected ,as it is intending to count the current year material number DISTINCT quantity, however, the same materials could be received also in past years, instead of being new materials here.
Hi,
In your case, I think you can use Indirect set analysis like this formula :
Sum({<Material=e({<Year={$(=Max(Year)-1)}>})>} Qty)
Use it in you table for Qty, and select a Year. It will excluse all Material with Qty for the previous year.
For several years of historic, you can use :
Sum({<Material=e({<Year={"<=$(=Max(Year)-1)"}>})>} Qty)
@christophebrault wrote:Hi,
In your case, I think you can use Indirect set analysis like this formula :
......
For several years of historic, you can use :
Sum({<Material=e({<Year={"<=$(=Max(Year)-1)"}>})>} Qty)
Hi Christophebraul, thanks for reply.
i intend to count DISTINCT new material numbers quantity starting to appear in this year. So the expression formula is supposed to be Count(DISTINCT{<?=e({<Year={"<=$(=Max(Year)-1)"}>})>} [Material Number]), correct? what should be on the position of question mark "?" instead?
Then, put
Count(DISTINCT{<[Material Number]=e({<Year={"<=$(=Max(Year)-1)"}>})>} [Material Number])
For previous year :
Count(DISTINCT{<[Material Number]=e({<Year={"<=$(=Max(Year)-2)>=$(=Max(Year))"}>})>} [Material Number])