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.
Good Anil, its working
but Why My expression is not working .
Hi Bro,
Its not working ,The main thing is We are not able to check the Accumulation in Pivot Table.
The main reason is you are en-counting the sum for Total Where Maximum date
<= Max(Month) -- Returns from Max date to Min Date
When we restrict Something in >= Condition it will consider as Min to Max. Here, Set analysis work as Conditional like >= and <= Condition
if it's working then can' t you use this expression?
try with this
sum({<Month={'<=$(Variable3)'},Month>}Sales)
Not working Brother,
It was showing all months data
would you be able to share the sample?
Hi Bro,
PFA
Hi Anil,
This is good
sum({<Month={">=$(=YearStart(Max(Month))) <=$(=Max(Month))"}>}Sales) ( if i am select 2017 May its showing May and above all months)
The main thing if i select 2017 may ,i want to show 2017 may and above data in one column and 2016 may and above data in one column .
Output:-
Ex:-(if i select May 2017)
Year, Monthname 2016 2017
Jan2016 100 0
Feb2016 200 0
2016 Mar2016 300 0
April2016 400 0
May2016 500 0
Jan2017 0 600
Feb2017 0 700
2017 Mar2017 0 800
April2017 0 900
May2017 0 1000
if i select June i want to show both years from June to January.
Regards,
Mahesh
sum( aggr( rangesum( above( sum( {1<MonthName>} Sales),0,3) ), MonthName))