Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day
It is necessary to calculate the number of days when the stock was higher than the average sales
Average Sales are in the first column
Count (Distinct if (stock> Column (1), Date)) does not work
Hi.
Could you provide more info about chart dimensins and expression in Column (1) ?
Dimensions: goods
Average Sales:
Sum({<Date={">=$(=
Date(If(
IsNull(
FirstSortedValue({<Count={">0"},Satus={"1"},Check={"1"}>} Date, -Date, 20)),
Min({<Count={">0"},Ststus={"1"},Check={"1"}>}Date),
FirstSortedValue({<Count={">0"},Status={"1"},Check={"1"}>} Date, -Date, 20))
))"},Count={">0"},Status={"1"},Check={"1"}>} Count
)
/If(
IsNull(
FirstSortedValue({<Count={">0"},Status={"1"},Check={"1"}>} Date, -Date, 20)),
Count({<Date={">=$(=Min({$<Count={">0"},Status={"1"},Check={"1"}>}Date))"},Count={">0"},Status={"1"},Check={"1"}>}distinct Date ),20)
the number of days when the stock was higher than the average sales
You could use aggr() to check it for all Dates (and keep goods dimension):
=Count (aggr(if(stock>Column (1), Date, null()), Date, goods))
does not work
Could you post a sample ?