Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I need to calculate quantity of days with sales more than 0 in the context of each store.
I use expression "Count({<Date = {"=sum(Quantity)>0"}>} DISTINCT Date)" but it doesn't work.
Help me please to solve this problem.
Create a composite key field in the script like:
Load
Shop&Date as Key,
*
Resident Base;
And then use expression like: =Count({<Key={"=sum(Quantity)>0"}>} DISTINCT Date)
Create a composite key field in the script like:
Load
Shop&Date as Key,
*
Resident Base;
And then use expression like: =Count({<Key={"=sum(Quantity)>0"}>} DISTINCT Date)
Alternatively, you can also try this
Count(DISTINCT Aggr(If(Sum(Quantity) > 0, Date), Shop, Date))
But if you can, I would suggest you to change your data model so that you can use set analysis, just like tresesco mentioned above.