@shubha_da wrote:
Dear All,
I need to calculate (in VIYA 4.0) the value from last FY last date to selected date from report.
Example: If user select 10Nov2023 from filter, then the value should calculate the difference and %difference from 31st Mar2023. If user select 05Jan2023 then value should calculate from 31Mar22 to 5th Jan2023.
Thanks,
S Bakshi
@shubha_da wrote:
...
Calculations should be always from last fiscal year last date.
How do you know what date is the end of the fiscal year? If your data is for corporations, each company can have a different fiscal year end date.
With SAS VA (I'm assuming you are using SAS Visual Analytics on Viya 4) you have two choices. Either you can calculate your financial year when preparing the data to be loaded into memory or you can create a VA formula that will derive the FY once the data is loaded into memory. Personally I find it easier to do this when preparing the data:
data Want;
input trandate ddmmyy10. Amount;
FY_Date = intnx ('YEAR.4', trandate, 0, 'END');
format trandate FY_Date date9.;
datalines;
25/02/2022 100
31/03/2022 50
12/05/2022 100
10/09/2022 150
02/03/2023 75
31/03/2023 100
05/10/2023 200
13/11/2023 150
;
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!