Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
chart series how to do a percentage series
dmoore
<p>I want a percentage of sum(numValue) / sum(denValue)<br><br>
with my query being SELECT numValue, denValue, ... area, state, organization ...<br>
I don't think I can do any type of sum in my query<br><br>
in the chart GUI there is expression builder but I don't see any type of expressions to do sum</p>
<p>and in the aggregate expression drop down just below the series there is these<br>
None<br>
Moving Average<br>
Running Sum<br>
Running NPV<br>
Rank<br>
is...<br>
Percent Rank<br>
Percent Sum<br>
Running Count<br><br><br>
this calculation is basically the percentage of the num/den of the data that will be shown - but the data will have to be filtered to certain area, or state, or org etc<br><br>
if you say the calculation has to be done in the query I don't see how I can group data by say or by org on the fly if those values are in the query.<br><br>
</p>
Find more posts tagged with
Comments
mwilliams
<p>So, you want the percentage of the overall? Not just of the values shown in the chart? Is this correct?</p>
dmoore
<p>example:<br>
my data has 20 rows/ reportDate that should make up 1 series<br>
select numValue, denValue, ReportDate, organization from tbl<br><br>
the x series = month/year = Jan 2014, Feb 2014, ...<br>
the y series = (sum(numValue) / sum(denValue)) * 100 = 48%, 52%, 38%, 42%, ...<br><br>
so it needs to group up the sum of all the numerators and sum of all the denominators and make the calculation<br><br>
does the sum(numValue) HAVE to be done in the query so that I only get 1 row / reportDate ? or can this calculation be done in the GUI ?<br>
</p>
mwilliams
<p>Can you provide a small sample of what the data looks like in your data set?</p>
dmoore
<p>num | den | reportDate | org | site<br>
3 4 1/1/2014 org1 site1<br>
2 4 1/1/2014 org1 site2<br>
1 5 1/1/2014 org1 site3<br>
2 4 1/1/2014 org2 site4<br>
2 4 1/1/2014 org2 site5<br>
1 4 1/1/2014 org2 site6<br><br>
3 4 2/1/2014 org1 site1<br>
1 4 2/1/2014 org1 site2<br>
2 5 2/1/2014 org1 site3<br>
2 5 2/1/2014 org2 site4<br>
1 5 2/1/2014 org2 site5<br>
1 5 2/1/2014 org2 site6<br><br>
I should end up with 2 series lines (org1 and org2)<br>
percent(sum(num) / sum(den))<br><br>
below the dates are x axis and the values are y axis (should be formatted as xx%)<br>
series org1<br>
1/1/2014 (sum(3+2+1) / sum(4+4+5)) * 100<br>
2/1/2014 (sum(3+1+2) / sum(4+4+5)) * 100<br><br>
series org2<br>
1/1/2014 (sum(2+2+1) / sum(4+4+4)) * 100<br>
2/1/2014 (sum(2+1+1) / sum(5+5+5)) * 100<br>
</p>
mwilliams
<p>Take a look at this report. I use a table to group the values, then use the optional chart view of a table to use the table's groupings as fields for the chart. I think this does what you're wanting. Let me know.</p>
<p> </p>
<p> </p>
dmoore
<p>i was able to open and run this report and see how you added the column bindings to do it correctly.<br><br>
I currently have just the developer and when I open report > change property editor - chart TO Bindings<br>
I here see the available column bindings which you created.<br>
all the edit | add buttons are greyed out.<br><br>
is this feature only allowed in the professional (paid) version?</p>
mwilliams
<p>They're grayed out in the chart because it's using the bindings from the table. I created all the bindings I needed in the table view, then set up the chart view using those bindings. If you ever use another element for your data, the options are going to be fairly limited.</p>