Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i am in this situation: i have a table with those columns:
gen_consumo_mensile,feb_consumo_mensile, mar_consumo_mensile,apr_consumo_mensile,mag_consumo_mensile,giu_consumo_mensile, lug_consumo_mensile, ago_consumo_mensile, set_consumo_mensile, ott_consumo_mensile,nov_consumo_mensile,dic_consumo_mensile
Are 12 columns
I want to make a bar chart with, in the dimension i have months (gen,feb, mar,apr,may, jun,jul,ago,sep,oct,nov,dec) and in the bar the sum of those columns (for JAN i want the sum of GEN_CONSUMO_MENSILE, for FEB i want the sum of FEB_CONSUMO_MENSILE, for MAR i want the sum of MAR_CONSUMO_MENSILE.... and so on till for DEC the sum of DIC_CONSUMO_MENSILE.
How can i do that?
Thanks you Aiolos but i need to show not sum(consumo_mensile) i need to show
Those 12 columns:
gen_consumo_mensile,feb_consumo_mensile, mar_consumo_mensile,apr_consumo_mensile,mag_consumo_mensile,giu_consumo_mensile, lug_consumo_mensile, ago_consumo_mensile, set_consumo_mensile, ott_consumo_mensile,nov_consumo_mensile,dic_consumo_mensile
bar chart with, in the dimension i have months (gen,feb, mar,apr,may, jun,jul,ago,sep,oct,nov,dec)
and in the bar the SUM of those columns (for JAN i want the sum of GEN_CONSUMO_MENSILE, for FEB i want the sum of FEB_CONSUMO_MENSILE, for MAR i want the sum of MAR_CONSUMO_MENSILE.... and so on till for DEC the sum of DIC_CONSUMO_MENSILE.
So which column in your file is the "months" you said, I didn't find it.
take :
dimension: Month
Expression :
=if(Month= 'Jan',sum(GEN_CONSUMO_MENSILE),
if(Month= 'Feb',sum(FEB_CONSUMO_MENSILE),
if(Month = 'Mar',sum(MAR_CONSUMO_MENSILE))))
.........
.........
Becouse Months, are not a field in my table, months must be fixed
Can you try to do it in the example i attached? becouse for me it doesn't work
Could you please give a sample and also the desired result you want?
Because I think in my attachment, I just for Jan - sum(gen), Feb - sum(feb). but you said it's not correct.
So could you please tell me the desired result you want? you can make it in excel and screenshot to me.
Hi Daniele,
please try the bellow.
Dimension:
=ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')
expression:
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Jan',sum(GEN_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Feb',sum(FEB_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Mar',sum(MAR_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Apr',sum(APR_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'May',sum(MAG_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Jun',sum(GIU_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Jly',sum(LUG_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Aug',sum(AGO_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Sep',sum(SET_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Oct',sum(OTT_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Nov',sum(NOV_CONSUMO_MENSILE),
if(ValueList('Jan','Feb','Mar','Apr','May','Jun','Jly','Aug','Sep','Oct','Nov','Dec')= 'Dec',sum(DIC_CONSUMO_MENSILE)
))))))))))))
Thanks Praveen i think we are near the solution... i attach the example with your script, is ok now for dimension, only in the script not work the Sum total of the expressions...
for Example select 2017 year, i expect those total in the chart :
gen_consumo_mensile = 1374
feb_consumo_mensile = 1035
mar_consumo_mensile = 907
apr_consumo_mensile = 594
and so on....
those are the totals you see in the table above tha chart
thanks
I don't know whether you see my attachment seriously.
my result is:
And you said that's wrong, that's not what you want.
I don't know becouse using your expression in my sample (attached) it not work
i attached before the sample, can you use it to make it correct?