Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data for multiple months. Need to show YTD stats for current fiscal year. do not want to hard code current fiscal year:
I am using below code but it isn't working:
=Count(Distinct if([Training Start date.Fisc.Year]=Max([Training Start date.Fisc.Year]),TITLE))
I have also created a variable and used code in data load editor as below:
Date(today()) as Date_Today
In visualization as below:
=Count(Distinct if([Training Start date.Fisc.Year]=$(Date_Today.Fisc.Year),TITLE))
but its not working 😞
Hi Rabia,
The "Title" needs to be in all caps "TITLE". Also make the following change :
Count({<[Training Start date.Fisc.Year]={">=$(=date(yearstart(max([Training Start date.Fisc.Year]),0,4)))<=$(=date(max([Training Start date.Fisc.Year])))"}>} TITLE)
Kindly check such field names stuff at your end too..
Regards,
Rohan.
Hi Rabia,
You need to use a simple Set analysis expression for YTD in this case, Try the following :
Count({<[Training Start date.Fisc.Year]={">=$(=yearstart([Training Start date.Fisc.Year],0,4))<=$(=max([Training Start date.Fisc.Year]))"}>} Title)
Note: Adjust the yearstart() parameters according to your fiscal year start.
Regards,
Rohan.
Thank you for the quick response. I have tried the code but its still giving me attached error.
I am just getting started with set analysis, not very comfortable with it so i was trying to handle it with coding in data load editor.
Hi Rabia,
My bad, here's an edit :
Count({<[Training Start date.Fisc.Year]={">=$(=yearstart(max([Training Start date.Fisc.Year]),0,4))<=$(=max([Training Start date.Fisc.Year]))"}>} Title)
Also, Is this field "[Training Start date.Fisc.Year]" in date form or num form ?
Regards,
Rohan.
Its in Date format
and its still not working 😞
Screen shot attached
Hi Rabia,
The "Title" needs to be in all caps "TITLE". Also make the following change :
Count({<[Training Start date.Fisc.Year]={">=$(=date(yearstart(max([Training Start date.Fisc.Year]),0,4)))<=$(=date(max([Training Start date.Fisc.Year])))"}>} TITLE)
Kindly check such field names stuff at your end too..
Regards,
Rohan.
Thank you so much for the help, much appreciated!