Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am using set analysis to display current month salary
=sum({<Date={">=$(=MonthStart)<=$(=MonthEnd)"}>}Salary)
But using this set analysis im getting last month Salary Also
could some one help me to display current month salary only
Thanks In Advance
Niranjan
Hi,
Try like this
Data:
LOAD
Date(Date#(Date, 'DD/MM/YYYY')) AS Date,
Salary
INLINE [
Date, Salary
01/01/2014, 100
03/01/2014, 200
06/01/2014, 300
07/01/2014, 400
10/02/2014, 500
11/02/2014, 600
12/02/2014, 700
13/01/2014, 800
];
=sum({<Date={">=$(=Date(Date#('01/02/2014', 'DD/MM/YYYY')))<=$(=Date(Date#('28/02/2014', 'DD/MM/YYYY')))"}>}Salary)
Regards,
Jagan.
Hi Niru,
For Ex,
=sum({<Month ='Jan'>}Salary)
Hi,
Hope try this,
Sum({$<Month={$(=Max(Month))}>}[salary])
Hi Kumar,
I need to display current month starting date to Till date Salary
Regards,
Niranjan
Are you trying to show the all the dates between start date and end of the month?
yes Sneha ......
You can create two variables for current month start date and end date.
And the use can use expression like
=sum({<Date={">=$(=vStart)<=$(=vEnd)"}>}Salary)
hi try this
sum({<Year={$(=max(Year))},Monthnum={$(=max({<Year={$(=max(Year))}>}Monthnum))},Date={'<=$(=max(Date))'}>}Salary)
here for Monthnum, do in backend like below :
num(Month(Date)) as Monthnum
Yes i Followed the same way
you can check my expression above i m following the same technique
=sum({<Date={">=$(=MonthStart)<=$(=MonthEnd)"}>}Salary)
but im getting last month salary values also
plz help me
Regards,
Niranjan
Hi,
Check whether dates in the variables and Date dimension are in same format and also check the values in the variables.
If date format differs then it wont work as expected.
=sum({<Date={">=$(=MonthStart)<=$(=MonthEnd)"}>}Salary)
Regards,
Jagan.