Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Im a new user of QV, i hope you solve this problem
How do I get and expression for previous day?
I have sales from a period and use set analysis to select certain group of salesman
In the same table y need to shown the sales of yesterday, for these group of salesman.
Sum({<[CLASE DE VENDEDOR]={'NACIONALES'}, DATE=VDIAANTERIOR>}Ventas)
the variable = VDIAANTERIOR=Date(Now()-1)
This doesnt work.
HELP PLEASE.
I believe like this:
Sum({<[CLASE DE VENDEDOR]={'NACIONALES'}, DATE={'$(VDIAANTERIOR)'}>}Ventas)
WARNING: Using now() in a chart like this is dangerous. In its default mode, now() updates every second. That means your chart must be recalculated every second. If it takes a second or more to calculate this chart, it will max out your CPU time. Also realize that now() returns a timestamp, not a date. While the date() function will format it as a date, and my changes above will then ignore the time portion, the time portion still exists. You could do floor(now(2)), but you might as well just use the today() function. The default mode of the today() function is also CPU friendly, in that it only checks the date when the document is opened. What I would do is skip the variable completely, and code it like this:
sum({<[CLASE DE VENDEDOR]={'NACIONALES'}, DATE={'$(=date(today()-1))'}>} Ventas)