Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i need to do a setanalisys for my chart, i have some month to choose, so if i choose one month i need to do set analisys for one month, is i choose more month i need to do the set analisys for the max month i choose (the months will be 2 characters like '01','02'); if i not choose nothing my set analisys must be for the actual month (for example now we are in september so it must be '09'. How can i do that?
I wrote this but not work:
Sum({<MONTH_COMP={"=$(=num(rangemax($(=GetFieldSelections(MONTH_COMP))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000
Hi i find the error in my expression
Sum({<MONTH_COMP={"=$(=num(rangemax($(=GetFieldSelections(MONTH_COMP))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000
this "=" not need
so the right expression is:
Sum({<MESE_COMPETENZA={"$(=num(rangemax($(=GetFieldSelections(MESE_COMPETENZA))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000,
but now i have another problem, till i choose max six months, is all ok, if i choose seven months.... the expression show me "-" why?
Hi again! 🙂
Something like
Sum({<MONTH_COMP = {$(=Max(MONTH_COMP))}>} TOT_CONSUMO_PERDITE)
should work.
Regards,
Jaime.
Hi, sorry, no it not work and it need to have the "num" function becouse like i said in the post the month are with 2 charatcher like '01'
Then try
Sum({<MONTH_COMP = {$(=MaxString(MONTH_COMP))}>} TOT_CONSUMO_PERDITE)
But, maybe, you should cast MONTH_COMP to a number in the load script instead of keeping it as a string, given how you are using that field!
Regards,
Jaime.
no sorry it not work.
my set analisys work ok for the every month:
Sum({<MONTH_COMP={"=$(=num(rangemax($(=GetFieldSelections(MONTH_COMP))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000
but when i choose 2 o 3 months (like: '01','02','03') it take the SUM of all those 3 month, and i want ONLY the SUM for the '03' month in this example
Hi i find the error in my expression
Sum({<MONTH_COMP={"=$(=num(rangemax($(=GetFieldSelections(MONTH_COMP))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000
this "=" not need
so the right expression is:
Sum({<MESE_COMPETENZA={"$(=num(rangemax($(=GetFieldSelections(MESE_COMPETENZA))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000,
but now i have another problem, till i choose max six months, is all ok, if i choose seven months.... the expression show me "-" why?