Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a straight table of employee related data (days worked, contracted days etc.) that contains a number of calculated fields, one of which is 'overtimedays'. I am trying to put this field into another expression in the same table:
Sum({< [Entry Date] = {">$(=Date(Today() - ((17 * 7)+ [overtimedays] )))"}, Project_Type = {"Project", "Non_Project"} >} [Total Hrs])However, this doesn't seem to work. If i replace [overtimedays] with a number, the expression works fine.
Any ideas how I can make this type of calculation work? I'm fairly new to QlikView.
Thanks!
Could you explain how I make it a variable please?
As a simple example, let's say that your column expression is this:
sum(Sales)
You could create a variable (settings -> document properties -> variables -> new, among other methods) and set the value to sum(Sales). Then wherever you want to use it, use $(MyVariable) instead. The dollar sign expansion will then literally insert sum(Sales) where that expression is at execution time, so it's just as if you'd typed it in yourself, but it prevents dual maintenance when you're using the same expression in multiple places.
Thanks John! First attempt this appears to do the trick, but let me play with it a bit more to be sure. I really appreciate your help.