Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created variables named StartDate and EndDate
Then in slider/calendar object i selected =Min(Date) as minvalue and =Max(Date) as maxvalue
similarly for variable EndDate i choosed =$(StartDate) as minvalue and -Max(Date) as max value
then in a barchart in expression i wrote
=Sum(if( Date>=$(StartDate AND Date <=$(EndDate),Field1))
But chart is not responding accordingly
You'll want to use max({1} Date) and min({1} Date) instead of max(Date) and min(Date). The {1} will make sure the min and max dates you can select are not influenced by earlier selections. And you need to use triggers so that the selection in your Date field changes if you change the dates in your calendar objects. See this tutorial for a complete explanation.
Your sum expression can be rewritten as sum({<Date={'>=$(StartDate)<=$(EndDate) '}>} Field1). But only if you don't use Date as a dimension in your bar chart. Otherwise use your expression.
on second calendar:
minvalue :
=date($(StartDate))
maxvalue:
=Max(1{}Date)
use
=Min({}Date)
=Max({}Date)
then in expression use
=Sum(if( Date>=$(StartDate) AND Date <=$(EndDate),Field1))
see att qvw file
You'll want to use max({1} Date) and min({1} Date) instead of max(Date) and min(Date). The {1} will make sure the min and max dates you can select are not influenced by earlier selections. And you need to use triggers so that the selection in your Date field changes if you change the dates in your calendar objects. See this tutorial for a complete explanation.
Your sum expression can be rewritten as sum({<Date={'>=$(StartDate)<=$(EndDate) '}>} Field1). But only if you don't use Date as a dimension in your bar chart. Otherwise use your expression.
Could you please try below expression?
=Sum(if( Date>=$(StartDate) AND Date <=$(EndDate),Field1))