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)
Adding Numeric Ranges as per data on X axis in Bar Chart
kalpana5
<p>Could anyone please suggest on how to add numeric ranges like 0-24, 24-48 ..etc pattern on x axis as per data on Bar Chart.</p>
<p> </p>
<p> </p>
<p>Thanks.</p>
Find more posts tagged with
Comments
micajblock
<p>Create a computed column with for the range and chart on the computed column.</p>
kalpana5
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="134752" data-time="1426885592">
<div>
<p>Create a computed column with for the range and chart on the computed column.</p>
</div>
</blockquote>
<p>Hi,</p>
<p> </p>
<p>Thank You for the reply, could you please suggest how can we create a computed column with for the range.</p>
micajblock
<p>You create a computed column on the data set with a string data type with code like below:</p>
<div>
<pre class="_prettyXprint">
if (row["numberColumn"] <= 24) {
"0-24";
}
else if (row["numberColumn"] > 24 && row["numberColumn"] <= 48) {
"24-48";
}
else {
">48"
}</pre>
</div>
<p> </p>
kalpana5
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="134810" data-time="1427146758">
<div>
<p> </p>
<p>You create a computed column on the data set with a string data type with code like below:</p>
<div>
<pre class="_prettyXprint">
if (row["numberColumn"] <= 24) {
"0-24";
}
else if (row["numberColumn"] > 24 && row["numberColumn"] <= 48) {
"24-48";
}
else {
">48"
}</pre>
</div>
<p> </p>
</div>
</blockquote>
<p>Sure, Thank You, would like to get one more suggestion , since data might change, how could it be achieved dynamiclly like depending on data the range of values change.</p>
micajblock
<p>Do it in the SQL with a case statement.</p>
kalpana5
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="134877" data-time="1427313609">
<div>
<p>Do it in the SQL with a case statement.</p>
</div>
</blockquote>
<p>Sure. Thank You!</p>