Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am new to Qlikview and trying to understand the 'Today' syntax using an If statement. The goal is to find the number of days open from Today's date - ClaimNotifyDate.
if (ClaimStatus = F , StatusDate-ClaimNotifyDate ,$(=today() - ClaimNotifyDate)) as 'Days Open',
I am receiving this error message: Error in expression:')'expected
Thanks..
How often is this reloaded? I don't know if the values in the script get updated if it's not reloaded. If it's reloaded every day, there's no need for a variable.
You also don't need the dollar sign expansion. Just use your original expression (assuming the other fields are formatted properly as dates) -
if (ClaimStatus = F , StatusDate-ClaimNotifyDate , Today() - ClaimNotifyDate) as 'Days Open'
I would create a variable for the Today() function in the laod script:
LET vToday = Today();
For the expression i believe you had your ClaimNotifyDate field in the same expression as today function.
if (ClaimStatus = F , StatusDate-ClaimNotifyDate ,$(=today() - ClaimNotifyDate)) as 'Days Open'
if (ClaimStatus = F , StatusDate-ClaimNotifyDate ,$(vToday)-ClaimNotifyDate) as 'Days Open'
Something to worry about here is that you want to have your date fields recognized as date fields. So you still may have issues returning proper data and that;s most likely due to the format of the date fields you have.
Good luck
Oscar
How often is this reloaded? I don't know if the values in the script get updated if it's not reloaded. If it's reloaded every day, there's no need for a variable.
You also don't need the dollar sign expansion. Just use your original expression (assuming the other fields are formatted properly as dates) -
if (ClaimStatus = F , StatusDate-ClaimNotifyDate , Today() - ClaimNotifyDate) as 'Days Open'
Daniel,
Thanks for providing the correct answer. To answer your question regards to reloading the data, currently I am reloading it, its not currently scheduled. Once scheduled it will probably be weekly.
Thanks.