Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a chart showing sales values, and I allow the user to select which week or weeks they would like to show the values for. So they might select weeks 3,4 and 5.
I would like to have an extra chart which shows the total value from week 1 to the max week selected (so weeks 1-5 in my example).
Is there a function to select the max value in this way ?
Thanks
Richard
set analysis :
sum({<Week={>=1,<=$(=max(Week)} value)
update:
Sum({<Week={">=1<=$(=Max(Week))"}>} Value)
No, you have to manage strings, in my example if your field is DIM then
=Mid(GetFieldSelections(DIM,',',50), Index(GetFieldSelections(DIM,',',50), ',', -1)+1)
let me know
set analysis :
sum({<Week={>=1,<=$(=max(Week)} value)
update:
Sum({<Week={">=1<=$(=Max(Week))"}>} Value)
Hi Richard,
In a simple example, if Week is a numeric field and expression is Sum(Sales), you can use:
Sum({<Week={'<=$(=Max(Week))'}>} Sales)
If user selects weeks 3-5, the Bold part tells qv to ignore week selection and calculate the expression like if Week selection was "<=5"
Thank you for your fast response and correct solution to my problem.