Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
To sum some values we use the following function: sum( Value )
Example:
sum( TotalSales )
But, what to do if you want just view the sales of 2014 ?
We can use the Set Analysis, then don't need make SQL script.
Using Set Analysis:
sum( {<Year = {'2014'}>} TotalSales)
This will sum the TotalSales of 2014, without othes years
Hi Marcus,
What you want Exactly???
Try this
make a variable vMaxYear
=max(Year) //Expression for variable
then on expression side
SUM(Total {<Year={'$(vMaxYear)'}>} Sales)
or this one also
SUM({1} {<Year={'$(vMaxYear)'}>} Sales)
Dynamic
Sum({$< Year = {$(=Max(Year))}>} Sales )
vikas
This is just a exemple for begginers.
Thanks.
See Dynamic Full .
Vikas
Thanks for this.
I'm trying to understand set analysis and your file is very helpfull.
I still don't make it with my proper file...
I can see your formulas but there is no numbers. For instance sum (...) match, but sum ( {$} ... ) don't.
My question is :
Can my QV version be too old to set analysis? (QV 8.2)