logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
abhijitbhalgat  
#1 Posted : Sunday, December 22, 2019 3:45:30 PM(UTC)
abhijitbhalgat

Rank: Newbie

Groups: Registered
Joined: 7/19/2015(UTC)
Posts: 1
India
Location: Pune

How to generate Pareto graph in seal report ?

A Pareto chart is a type of chart that contains both bars and a line graph, where individual values are represented in descending order by bars, and the cumulative total is represented by the line.

The left vertical axis is the frequency of occurrence, but it can alternatively represent cost or another important unit of measure. The right vertical axis is the cumulative percentage of the total number of occurrences, total cost, or total of the particular unit of measure. Because the values are in decreasing order, the cumulative function is a concave function.

To take the example below, in order to lower the amount of late arrivals by 78%, it is sufficient to solve the first three issues. Pareto Graph


Refer: https://en.wikipedia.org/wiki/Pareto_chart
epf  
#2 Posted : Monday, December 30, 2019 9:37:01 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
I made a sample for this, you can download it.
A model displaying 2 amounts.
Sort descending for 'Amount'. No sort for the other elements.
Cell script for the '%' to calculate the running total.
Series configuration with use of Primary and Secondary axis.

Here is the cell script I used for the running total:
Code:
@{
	//Calculate a running total
	ResultCell cell=Model;
	ReportElement element = cell.Element;
	ReportModel reportModel = element.Model;
	Report report = reportModel.Report;
    if (cell.ContextRow == cell.ContextTable.RowCount - 1)
	{
		//No running totals for last table line (summary or data)
		cell.Value = null;		
	}
	else if (!cell.IsSerie && !cell.IsTitle && cell.ContextRow > 0)
	{
        //Normal case for DataTable and SummaryTable
		var previousValue = cell.ContextTable[cell.ContextRow-1,cell.ContextCol].DoubleValue;
		var currentValue = cell.ContextTable[cell.ContextRow,cell.ContextCol].DoubleValue;
		//Calculate the running total
		cell.Value = currentValue + (previousValue != null ? previousValue : 0);
    }	
}



And here is the final report:

16-Pareto Graph.srex (6kb) downloaded 2 time(s).
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.