Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have one requirement to 'show data for previous year until end of Q1 and from Q2 show current year' when open an app by default.
Lets say if we are in current year and current quarter (any Month Jan/Feb/Mar in Q1), by default app should open with previous year selection until Q1 ends then if we are enter into Q2 the year should select with current year.
I already have one bookmark (pic below) which shows current year and months (as of today) by default when open an app but need to implement the above requirement.
could you please help me with the ways to implement?
I use following approach to achieve the solution
//Step1: Define Variable for Current Year and Quarter
let vToday = Today();
let vCurrentYear = Year(Today());
let vCurrentMonth = Month(Today());
let vCurrentQuarter = Ceil(vCurrentMonth/3);
//Step 2: Determine the Year based on Current Quarter
If vCurrentQuarter = 1 then
let vYear = vCurrentYear - 1;
Else
let vYear = vCurrentYear ;
End If;
Then, I applied this variable in the Year filter in the app.
1. Click on the 'Year' filter
2. in the search box , type =Year=$(vYear) and press enter , this will filter the data to the previous year if the current quarter is 1
I use following approach to achieve the solution
//Step1: Define Variable for Current Year and Quarter
let vToday = Today();
let vCurrentYear = Year(Today());
let vCurrentMonth = Month(Today());
let vCurrentQuarter = Ceil(vCurrentMonth/3);
//Step 2: Determine the Year based on Current Quarter
If vCurrentQuarter = 1 then
let vYear = vCurrentYear - 1;
Else
let vYear = vCurrentYear ;
End If;
Then, I applied this variable in the Year filter in the app.
1. Click on the 'Year' filter
2. in the search box , type =Year=$(vYear) and press enter , this will filter the data to the previous year if the current quarter is 1