Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to create a bar chart which calculate frequency within last 4 weeks.
I have a variable "MAX_FULL_DAY_DATA_DATE" which stores the maximum date and the format is date-time
here is my calculation, but the graph doesn't show anything:
=sum(if (DATE_VALUE <= date($(MAX_FULL_DAY_DATA_DATE),'mm,dd YYY') AND DATE_VALUE > date($(MAX_FULL_DAY_DATA_DATE)-28,'mm,dd YYY'), Frequency))
Can you please help?
thank you,
Nasim
hello,
try you this
sum(if (num(DATE_VALUE) <= num($(MAX_FULL_DAY_DATA_DATE)) AND num(DATE_VALUE) > num($(MAX_FULL_DAY_DATA_DATE)) - 28, Frequency))
Hi,
Write some thing like below but i suggest change the date format of variable in variable part like 'mm,dd YYY' and you use here only
=sum(if (DATE_VALUE <= $(MAX_FULL_DAY_DATA_DATE) AND DATE_VALUE > ($(MAX_FULL_DAY_DATA_DATE)-28), Frequency))
Hope this helps
Thanks & Regards
I use 'set analisys' for this kind of problems.
# 1st Covert the data to integer
var_DateMax=num($(MAX_FULL_DAY_DATA_DATE))
# 2nd Calculate initial date
var_DateMin=$(var_DateMax)-28
# 3rd Use set analysys to calculate the expression
sum({$<DATE_VALUE = {'>=$(var_DateMin)<=$(var_DateMax)'}>} Frequency)
Ferran
Thanks all,
Unfortunately, none of them are working. when I put any condition on Date_Value, I got an error.
the Date_Value has a date format.