Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am trying to display last four year sales in bar chart.What is wrong with the expression. Please guide
Sum({$<Year = {'<=$(=Max(Year )) >=$(=Max(Year )-3) '}>} sales)
maybe this:
=Sum( {< Year = {"<=$(=Max(Year))>=$(=Max(Year)-3)"} >} sales )
maybe this:
=Sum( {< Year = {"<=$(=Max(Year))>=$(=Max(Year)-3)"} >} sales )
in a set expression, if we wanna work with the year 2016 for example which is numeric: we call it without quotes:
Year={2016}
If we wanna focus on a country, Tunisia for example which is a string: we call it with quotes
Country={'Tunisia'}
In our case, we focusing on a range of dates created by an expression, so we surround it by double quotes:
Sum( {< Year = {"<=$(=Max(Year))>=$(=Max(Year)-3)"} >} sales )
Try with double quotes, then your string will be evaluated.
Hi Avneet,
Try below,
=Sum({<Year={">=$(=yearstart(Max(Year),-3)) <=$(=Date(Max(Year)))"}>} Sales )