Question
Pega Systems
IN
Last activity: 10 Apr 2017 14:14 EDT
Median in report
We have a requirement to show median in a Line-Segment chart. It is like weekly median cycle time trends.
Any quick pointers? I have tried a couple approaches but kind of stuck.
***Updated by Moderator: Marissa to update SR Details***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
I think I understand what you're looking for. The Series configuration you posted is almost there, it just needs one change. Under Display values as, choose the "other functions" option and choose the Median property. Make sure to leave the Function as "Default". If "Default" does not appear in the dropdown, make sure your Median property is configured as a Decimal or Double type property.
This should result in a chart where the X-Axis is a series of dates based on pxUpdateDateTime, the Y-Axis represents the Median values, and there is a line for each work status.
Pegasystems Inc.
US
Unfortunately there is no way for a Report Definition to calculate a median value, since relational databases are not designed for this type of calculation.
Your best bet might be to use a Chart control sourced from a Data Page which includes the data you need and calculates the desired median values using a post-processing Activity.
Pega Systems
IN
I am on the same approach actually. But I think I missed something in my configurations. Attached the options I thought about.
and also attached the configuration I made for chart embedded into a section.
It would be of great help, if you can look into this and let me know if I am missing something here.
Pegasystems Inc.
US
The Chart control doesn't see Median because you need to create a property for it on your class (looks to be GNW-LTC-Claims-Work). The autocompletes in the Chart configuration UI simply list the properties which apply to that class. Running the Data page to see what's available could be too slow.
Other than that, as long as your database accepts that SQL and returns the right data you should be all set. DMBSs don't have a common standard for median, so it would be a good idea to double check that your production system uses the same database provider.
Pega Systems
IN
That's great information, thanks for the response. I have created a median property and exposed it too since the chart only shows up exposed columns. not all available columns.
In the screenshot in the document, I captured one of the variants I tried. But otherwise, I mentioned median property on y axis.
When I run the data page, I am able to see the appropriate data. but that data is not getting translated into the chart. This is the challenge.
To get into the next level of details:
To show up the median (hope you got the use case already)-- on X-axis I am using pxUpdateDateTime and in general tab of chart control, I have chosen Multiple Series for Data source. And For Y-axis, I actually want graph of median with a curve/line for each status. So, for the series tab, what do you think would be the right configuration?
I have attached the results of Datapage and also series tab of the chart control.
Accepted Solution
Pegasystems Inc.
US
I think I understand what you're looking for. The Series configuration you posted is almost there, it just needs one change. Under Display values as, choose the "other functions" option and choose the Median property. Make sure to leave the Function as "Default". If "Default" does not appear in the dropdown, make sure your Median property is configured as a Decimal or Double type property.
This should result in a chart where the X-Axis is a series of dates based on pxUpdateDateTime, the Y-Axis represents the Median values, and there is a line for each work status.
Pega Systems
IN
Thanks for your help, it helps!! I would confirm once I am done with it!!
The series configuration - I could not get it correctly - I was sure about that. Its kind of confusing!! Thanks for the clarification on that!!!
Natwest Group
IN
Hi Trevor, Jvv
In our project we are using Chart control "half gauge" to display Rest service timing. Its working fine but problem is when we refresh UI automatically after 10 secs then this chart flickers, Is there any way to avoid this flickering of this chart.
rgds
Karan
Pegasystems Inc.
US
The chart flickers because it takes longer than 1 screen refresh (usually just under 17 milliseconds) to update the page with the refreshed control markup and render the chart. A good way to avoid this would be to take the UI refresh out of the equation by updating the chart using JavaScript. Unfortunately this is not a feature currently supported by the Chart control.