cbrown

Chart Labelling

Discussion created by cbrown on Dec 18, 2015
Latest reply on Dec 21, 2015 by cbrown

I have data regarding a number of sales, and I've created a new layout to display this information in a chart.  Simple layout, just a chart assigned to my Sales table and some buttons to sort the records and display the chart differently.  I would like this one chart to adapt depending on how the data is sorted, instead of having multiple charts.  I can get it to display just fine when I sort by "Year", for example, and the chart display changes accurately when I change the sort, but the issue comes in trying to get the chart labels to change for each sort.

 

The criteria are "Year", "Payment Method", "Sale Portal" and "Primary Income Type"

 

I created a new input field "Current Sort" that stores text about what the information is currently being sorted by.  My sorting buttons run a small script to "Sort By" and Set Field [ Sales::Current Sort ; "Year"]

 

Now I got to my chart labels and try to set my X-Axis by calculation to run a small test with 0 as my secondary result to see what is and isn't working:

If ( Sales::Current Sort="Year" ; Sales::Year ; 0 )

 

And all I get for my label is 0

 

I've tried as many variations as I can think of, with variables too, but it's not working

 

Is this even doable?  My knowledge and coding capabilities are limited

Outcomes