Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Here i want the Sum(sales) based on month selection with above all months
For example:-
My variable like
Variable3=MonthName(max(Date))
expression:-
=sum({<Month={'$(Variable3)'}>}Sales)
Here if i select may month its showing may month data its fine.
my requirement is:- if i select APRIL i want data from April,Mar,Feb,Jan
for that i have written expression like this
=sum({<Month={'<=$(Variable3)'}>}Sales(here i am getting result is Zero)
is there any mistake in expression ,please let me know.
Hi Experts ,
Help me on that loveisfailvinieme12swuehl@
Expression seems simple only, Would you able to provide sample to check
Let me explain little more how it will work
sum({<Month={">=$(=AddYears(Max(Month),-4)) <=$(=Max(Month))"}>}Sales)
PS - This will return when you click the month for April this will return as April, March, Feb, Jan.
The same way will work for Date as well if Date format is bit clear to understand each together ![]()
sum({<Date={">=$(=AddYears(Max(Date),-4)) <=$(=Max(Date))"}>}Sales)
How values in Month field looks like?
Depends a bit on your formatting of data,
basically your expression is correct, if you replace the ' with "
Suggest to try first with pure numerics.
Peter
Hey Anil,
thanks,
Here i have four years of data 2012 to 2015, if i select Nov 2015 ,
it was showing Nov 2015 to Jan 2012 i don't want like that
if i select Nov 2015 ,i want here from Nov 2015 to Jan 2015 sales only.
May i know Why My Expression is Not working
Hi Bro,
Monthname like
Jan 2012
,
,
,
,
Nov 2015
Hi Brother,
I tried with " "
its not working
Cool, Now you need to sort by help of YearStart. Make sure to use Date Format in case any weird happens
sum({<Month={">=$(=YearStart(Max(Month))) <=$(=Max(Month))"}>}Sales)
see this post
Calculating rolling n-period totals, averages or other aggregations