Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How field name change according to selection?

Hi

I have fields named as Month 1, Month 2, Month 3, Month 4, Month 5.

Where Month 1 is current month and month 2 till month 5 are next months.

What i want is when i select Dec 2017 from filter pane, my month fields name should change according to selection in chart.

Example data

1.PNG

I select Dec 2017 the month fields name changed from Month 1 to Dec-17, Month 2 to Jan-18, Month 3 to Feb-18 and so on.

2.PNG

And when Jan 2018 is selected from filter then the months fields name should changed as per below snap.

3.PNG

Want this in bar chart

Is this possible? If yes then please help

Thanks

12 Replies
pradosh_thakur
Master II
Master II

try this

get all the  distinct year-month values in the script and assign them 1 to N in ascending order. I mean to say creat a dual field something like

load yearmonth,dual(year-month,value) as abc

value should be 1 to n and should be different for all  months .

in the labels

use

text(concat(value))  or you can use getfield selection as well   --1st expression

text(concat(value)+1)    --2nd expression

.

.

.

.

try this out and let me know if it works.

Learning never stops.
luismadriz
Specialist
Specialist

hi Wajiha, just wondering how did you finally go about this,

Please let me know,

Cheers,

Luis

Anonymous
Not applicable
Author

Hi Luis,

Yes your solution works fine.

Thanks a lot