Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
With below expression, we are able to get sum of value which we have in 18months. How can we get count of the months
Sum({<Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(Date), -6)))"}>}Value)
For example, i will be having data as 100 in last 12 months, this does not mean as in all last 12 months i have data.
how can i get months and count of months in which i have data.
Can anyone please suggest on this
NO, on the app I send to you above, the expression used is this one :
=Count({<data1={"=len(trim(data1))<>0"}>}date)
Hi,
add this on your set analysis:
Value={"=len(trim(Value))<>0"}
this is to get value greater than zero right, how i can get months related to greater than zero value as my request
For example, i will be having data as 100 in last 12 months, this does not mean as in all last 12 months i have data.
how can i get months and count of months in which i have data.
Can anyone please suggest on this
in set expression ,try something like this:
months =" $(= p( Value={"=len(trim(Value))<>0"}) months )"
the solution I gave you is when you don't have data at all on a month with the measure Value (using month as dimension).
like this, as u said, it will not count the "non active" months.
did you try it ?
maybe this:
Count( {< Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(Date), -6)))"} >} Distinct your_month_field )
i tried using this, but no luck.
i am using correctly as you mentioned
Sum({<Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(Date), -6)))"}>}{"=len(trim(Value))<>0"})
i tried using this, but no luck.
am i using correctly as you mentioned
Sum({<Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(Date), -6)))"}>}{"=len(trim(Value))<>0"})
please add the below in set analysis:
your_month_field = {"=Sum(Value)>0"}
it is not correctly written..
try like this:
Sum({<Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(Date), -6)))"},Value={"=len(trim(Value))<>0"}>} Value)