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)
Displaying all category on X-Axis
Mohammed
Hi,<br />
<br />
We have created a query to use it on a bar chart. We have added our logic in the query to generate the X-axis categoris and the category type is string. Our requirement is to show the all the categories eventhough the data is not available for any of the category.<br />
<br />
We have also searched in this forum and found one sample example on months. In which, we have to make the "Type" of the "X-axis category" as "linear" and have to enable the "Is Category Axis" option. But in our case, we are not able to change the type to linear due to string data type.<br />
Could you people guide us on this?<br />
<br />
The query snippet;<br />
<br />
SELECT COUNT(DISTINCT RM_CAT.CONCERNROLEID) AS NUM_CHILDREN<br />
, RM_CAT.MONTH_CATEGORY<br />
, DECODE(RM_CAT.MONTH_CATEGORY, '<12 Months', 1, '12 - 24 Months', 2, 3) SORT_ORDER<br />
FROM ( <br />
SELECT FRP.CONCERNROLEID<br />
, CASE WHEN ROUND(MONTHS_BETWEEN(( ? - NVL(PL_UNDER_X.PL_DAYS, 0)), RM_ST.DAYDATE)) < 12 <br />
THEN '<12 Months'<br />
WHEN ROUND(MONTHS_BETWEEN(( ? - NVL(PL_UNDER_X.PL_DAYS, 0)), RM_ST.DAYDATE)) BETWEEN 12 AND 24<br />
THEN '12 - 24 Months'<br />
ELSE '>24 Months'<br />
END MONTH_CATEGORY<br />
FROM DM_FACTCCSREMOVALSPLACEMENTS FRP<br />
, ........<br />
<br />
<br />
Regards,<br />
Mohammed Ibrahim V.<br />
<a href='mailto:Mohammed.Ibrahim@curamsoftware.com' title='E-mail Link' class='bbc_email'>Email me</a>
Find more posts tagged with
Comments
mwilliams
Hi Mohammed,
So, you have the 3 string values I see in the image that you want to always be in the x-axis of your chart, but sometimes you don't have data for one or more of them? Is this what you're trying to do?
Mohammed
Thanks for the quick response williams.
To answer your question. Yes, All the categories have to be displayed. If data is not available for a category then label of the category has to be displayed with out the bar.
Regards,
Mohammed Ibrahim V.
mwilliams
Mohammed,
You could probably create a CSV or scripted dataSet that has all 3 values in it and then join this dataSet with the other dataSet to get your data and these 3 values in the dataSet guaranteed. You'll probably have to use computed columns in the joint dataSet to organize your data.