Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a few variable QS Buttons to control several KPI outputs on my page. What i want to display is the volume/Count of CLAIMNUM for the current calendar quarter when variable button vYEARS=2 is selected. I have this working for vYears=1 and 3 for current month and year but i'm struggling to get quarter view to work. example code in bold below. sorry cant share data as sensitive. this will be based on a calendar date. i then plan on extending this to have a comparison on current quarter and previous. Can you please help
if(vStatus=1,
if(vYears=1,Count({< LOB={'Motor'}, MonthYear = {"$(=Date(AddMonths(today(), -0), 'M-YYYY'))"}>} CLAIMNUM),
if(vYears=2,Count({$< LOB={'Motor'},[NOTIFIEDDATE.autoCalendar.Date] ={"=$(=(Date(Addmonths(QuarterStart([NOTIFIEDDATE.autoCalendar.Date]),-0),'DD-MM'YYYY')))"},[NOTIFIEDDATE.autoCalendar.Date]=>}CLAIMNUM),
if(vYears=3,Count({< LOB={'Motor'}, NOTYEAR = {"$(=max(NOTYEAR))"}>} CLAIMNUM)))),
Maybe like this:
if(vYears=2,Count({$< LOB={'Motor'},[NOTIFIEDDATE] ={">=$(=Date(QuarterStart([NOTIFIEDDATE]),'DD-MM-YYYY'))<=$(=Date(QuarterEnd([NOTIFIEDDATE]),'DD-MM-YYYY'))"},[NOTIFIEDDATE]=>}CLAIMNUM),
thanks for this. it does give me a return however this is returning a count of everything based on vYears=2,Count({$< LOB={'Motor'}. it hasn't restricted it to this quarter (Oct18-Dec18). Any other thoughts? full code below and ive attached a screen shot too
//Clears Claim Status Variable Button and Time View Variable Buttons if(vStatus=1, if(vYears=1,Count({< LOB={'Motor'}, MonthYear = {"$(=Date(AddMonths(today(), -0), 'M-YYYY'))"}>} CLAIMNUM), if(vYears=2,Count({$< LOB={'Motor'},[NOTIFIEDDATE] ={">=$(=(Date(QuarterStart([NOTIFIEDDATE]), 'DD-MM-YYYY'))<=$(=(Date(QuarterEnd([NOTIFIEDDATE]),'DD-MM-YYYY'))"},[NOTIFIEDDATE]=>}CLAIMNUM), if(vYears=3,Count({< LOB={'Motor'}, NOTYEAR = {"$(=max(NOTYEAR))"}>} CLAIMNUM)))))),