Profile Picture

Pull the "Current" item using GETAT

Posted By Bob Smith 11 Years Ago
Author
Message
Bob Smith
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 69, Visits: 1
I would like to use additional information about the "current" item in the data labels a line chart.

Here is some "sample" data:

DateTotalAction_Type
1/1/1310Restock
1/2/135Sale


I.E. I have a series of points in a step line chart. Each point represents a value and a date. On 1/1/13 "total" is equal to 10. On 1/2/13 "total" is equal to 5.

I can use the <value> data point to place the current value in a label on the data point.

I'd like to add the "Action" value to the data label so that the change in the "Total" between 1/1 and 1/2 is explained on the chart.

I can place "Fields!Action_Type" into the data label, but because I am referencing an array it only places "Restock" in the data label. I.E. Both instances on the step line chart will state "Restock" despite the fact that the change in inventory was due to a sale.

Is there some way to use the GETAT(arr, index) function and place the current "index" value into the index field in order to extract the action type of the current item?

It might look something like this:

="<value><br/>" + GETAT(Fields!Action_Type, CurrentItem)

Hypothetically this would return the following data labels:

10
Restock

5
Sale

I hope this question makes sense...


Bob Smith
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 69, Visits: 1

I hope these attachments help to explain. I've replaced the actual data with mock data that demonstrates what is going on (used MS paint, so it's not the best).

It seems that the data labels always pull the first entry in the array and not the "current" item. The "DesiredWYChart" is what I would *like* to have working, the "ActualWYChart" is a representation of what I have at this time. It displays the same data in each label.



Attachments
ActualWYChart.GIF (433 views, 13.00 KB)
DesiredWYChart.GIF (437 views, 13.00 KB)
Bob Smith
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 69, Visits: 1

I have created an example chart, uploaded the NCSP file and also the sample data.

I think that between the sample data and the sample chart, what I am trying to do is clear. In the same way that the "<value>" tag can be added to a data label, I would like to add information that is specific to that row / list entry in SharePoint.

Please change the extension on the "Sample_WY_Portion_Data" file from ".gif" to ".xlsx"



Attachments
Sample_WY_Portion_Data.gif (468 views, 12.00 KB)
Work_Portion_Calendar.gif (423 views, 22.00 KB)
Work_Portion_Data.gif (417 views, 15.00 KB)
Bob Smith
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 69, Visits: 1
Attached is the aforementioned NCSP file (change the extension from .gif to .ncsp). Also, set up two sharepoint date filter web parts; one titled "start date" and one titled "end date" with connections to the Nevron Charts web part on the same page. This will pass in date parameters for the chart to use when filtering data.

Attachments
Sample_WY_Breakdown_Chart.gif (431 views, 19.00 KB)
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Bob,
Thank you for providing additional details.
You need to do the following:

From the Pivot >> Data Groupings >> Values >> General >> Data tab, for the Label filed use the following expression:
=FIRST(Fields!Project_Name) + "<br/>" + FIRST(Fields!Project_Action)

In the Pivot >> Data Groupings >> Values >> Data Labels tab, for the Format filed use the following:
<value><br/><label>
or an expression:
="<value><br/><label>"

Few recommendations/suggestions:
You can try the labels layout configurations which are controlled from:
Chart Areas >> General >> Labels
Pivot >> Data Groupings >> Values >> Data Labels Layout

This can provide better readability for the chart.



Best Regards,
Nevron Support Team



Bob Smith
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 69, Visits: 1

Excellent! That was most helpful. I'll have to keep that tucked away...

One more question relating to the X-axis on this chart. Currently the X-axis displays one entry for each timestamp in the sample data. What I would like to do is map the data to an X-axis based on the calendar year; instead of one tick mark for each data point on the X-axis, I would like one tick mark for each month of the year. There should be as many years represented as are present in the entire data set.

I've attached 2 GIF files that roughly approximate this... hopefully this will shed some light on what I am trying to accomplish.



Attachments
WY_Portion_Axis_Desired.gif (442 views, 4.00 KB)
WY_Portion_Axis_Current.gif (409 views, 5.00 KB)
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

You currently use a step line chart with sub type of “Series” and you have a categorical scale.
In order to format the X axis as you require, you can use an expression to format the category labels. Under Pivot >> Data Groupings >> Categories >> General
For the Label field you can use: =FORMAT(Fields!Date, "MMM", "en-US")

However, you have multiple data points for one month and the result for the X axis will be:
Jan Feb Feb Feb Mar etc.

In this case you should be using an XY Scatter sub type and the Numeric scale. When you switch to XY Scatter sub-type, under the Pivot tab you first need to provide an X value (=Fields!Date).

Then from the Chart >> Chart Areas >> Axes >> Primary X >> Scale tab >> Numeric, you can configure the formatting:
Sub Type: Date Time
Formatting Mode: Fixed
Label Format: MMM

and set the Step Mode to custom step – 1 Month.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic