Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Kindly find the attached screen,
1. I have scenarios where I will have many no.of AppraisalDates(AppraisalStartDate,AppraisalEndDate) and I want to calculate the Final Rating by adding up for last 6 months(AppraisalEndDate: 7/12/2017-12/30/2017) as Current Rating and previous 6 months(AppraisalEndDate: 1/31/2017-6/30/2017) as Previous Rating.
2. And also I want to show the Start and End Months in chart like 'Jan to June'
Can anyone suggest me how we can do that?
let vCurrentYear=year(Today());
Load
Rating,
ID,
AppraisalPeriodToDate,
If(
Date(AppraisalPeriodToDate)>=MakeDate($(vCurrentYear),01,01)
and
Date(AppraisalPeriodToDate)<=MakeDate($(vCurrentYear),06,30),'Previous','Current') as Flag;
Load * Inline [
AppraisalPeriodToDate,Rating,ID
1/31/2017,7,1
2/28/2017,7,1
3/31/2017,8,1
4/30/2017,6,1
5/31/2017,7,1
6/30/2017,15,1
7/31/2017,7,1
8/28/2017,7,1
9/30/2017,8,1
10/30/2017,6,1
11/30/2017,7,1
12/30/2017,10,1
];
Use expressions in the front end
Previous rating -Sum({<Flag={"Previous"}>}Rating)
Current rating -Sum({<Flag={"Current"}>}Rating)
But if an employee starts the appraisal date from April(4/30/2016) to March(3/30/2017) how it will change dynamically and i want show first 6 month as previous rating and next 6 months as current rating
I want to show like this
Check it out