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)
Data Cube Question
dan3874
I have a data that has so many columns of data that they are each too small to read. As I have researched scripting, I believe I should be able to attach some Java Script at the onCreate level of the time field that heads the offending columns, to limit the number of items returned to the last 8 or so. I think I even know where and how to get this stuff entered.
My problem is that I have no idea what I would type in there so that the script tab would limit the number of items (columns) returned.
Any help would be appreciated!
Thanks,
Dan
Find more posts tagged with
Comments
JasonW
I am not certain I understand your quesiton, but why not filter dimension on time?
Jason
dan3874
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="69992" data-time="1288808516" data-date="03 November 2010 - 11:21 AM"><p>
I am not certain I understand your quesiton, but why not filter dimension on time?<br />
<br />
Jason<br /></p></blockquote>
I am already filtering on patient. I do not know how to filter on number of time columns. I don't want to filter based on a predefined date and time because I want to display as much information as possible. I just don't ever want the data to get so small that the doctor can't read it!
JasonW
If this is a crosstab why not just set a page break interval on the columns so if you have more than 8 columns it will do a page break?
Jason
dan3874
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="69994" data-time="1288809307" data-date="03 November 2010 - 11:35 AM"><p>
If this is a crosstab why not just set a page break interval on the columns so if you have more than 8 columns it will do a page break?<br />
<br />
Jason<br /></p></blockquote>
Jason,<br />
I'm attaching a PDF sample of my report. If you will notice the cube labeled "Vital Signs". I don't want it to take up more space than it does in this example.<br />
<br />
If I run the report setup so that I have a patient parameter I can limit the number of lines coming back in the SQL with "FETCH FIRST 8 ROWS ONLY". However, I am combining running this report by patient or by the department (which contains many patients). In that instance, I am defining the patient through some script attached to the data source, so the patient is not in focus when the SQL is run.<br />
<br />
I'm just trying to figure out how I can script in something to count the number of columns and stop processing after a certain number. I use data cubes and cross tabs a lot. I would always like to limit the number of columns they end up with so that the data never becomes unreadable.
JasonW
will a topn filter not work for you?
you can always specify an expression that allows you to calculate what the topn will be based on like:
if( data["year"] == 2005 ){
5;
}else{
0;
}
Jason
dan3874
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="69997" data-time="1288811692" data-date="03 November 2010 - 12:14 PM"><p>
will a topn filter not work for you?<br />
you can always specify an expression that allows you to calculate what the topn will be based on like:<br />
<br />
if( data["year"] == 2005 ){<br />
5;<br />
}else{<br />
0;<br />
}<br />
<br />
Jason<br /></p></blockquote>
Jason,<br />
Are you saying that I would put that code in the first expression builder on the filter tab, and base it on on the column value I am referring to? What points the 5 or the 0 to the number of columns?
JasonW
That is the returned value. The n is defined in the second box. That is where you would put the 8. i just used 5 and 0 in the expression to make sure that the topn included 2005 data first.
Jason
dan3874
That is the perfect answer. I didn't understand how that part worked. After playing with it for a little bit, I have it working perfectly!
Thank you for the information.