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)
how can I filter a column binding
caribe
hello
I have a report, and I want to filter some records, but the condition is over the results of a column binding, I could not do this.
If someone can help me, thanks.
Find more posts tagged with
Comments
mwilliams
Are you meaning the records need to be filtered on a computed column binding? If so, are you doing the computed binding in your table? If you are, can you do this in a computed column in your database instead? Then, you should be able to filter your table. Let me know if I'm misunderstanding.
caribe
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="96912" data-time="1330440746" data-date="28 February 2012 - 07:52 AM"><p>
Are you meaning the records need to be filtered on a computed column binding? If so, are you doing the computed binding in your table? If you are, can you do this in a computed column in your database instead? Then, you should be able to filter your table. Let me know if I'm misunderstanding.<br /></p></blockquote>
<br />
<br />
thanks for your interest..<br />
<br />
I have a dataset with select x,y,z<br />
<br />
table1<br />
<br />
x | y | z | w(a column binding whit a calculation) <br />
<br />
if I do a filter whit x, y o z works well, but if I use w it don`t work. the filter is simple (w not equal to 0) <br />
<br />
Tubal
<blockquote class='ipsBlockquote' data-author="'caribe'" data-cid="96967" data-time="1330469681" data-date="28 February 2012 - 03:54 PM"><p>
thanks for your interest..<br />
<br />
I have a dataset with select x,y,z<br />
<br />
table1<br />
<br />
x | y | z | w(a column binding whit a calculation) <br />
<br />
if I do a filter whit x, y o z works well, but if I use w it don`t work. the filter is simple (w not equal to 0) <br />
<br />
<br /></p></blockquote>
<br />
Can you filter on the calculation instead of the column binding?<br />
<br />
i.e. instead of filtering w != 0, do something like x + y + z != 0 (or whatever your calculation is)
caribe
<blockquote class='ipsBlockquote' data-author="'Tubal'" data-cid="96968" data-time="1330475064" data-date="28 February 2012 - 05:24 PM"><p>
Can you filter on the calculation instead of the column binding?<br />
<br />
i.e. instead of filtering w != 0, do something like x + y + z != 0 (or whatever your calculation is)<br /></p></blockquote>
<br />
thanks a lot for yours answers<br />
<br />
but I have a problem.<br />
<br />
I have a y = 1,3,5,2<br />
and z(is a column binding whit the result of the assignment of (y) so) z = 0,1,3,5,2 that`s what I need because I need compare the values of y (0 whit 1, 1 whit 3, 3 whit 5.......)<br />
<br />
now w is a column binding (y-z)<br />
<br />
now I try to do a filter (y-z)!= 0 and it don`t works
<br />
<br />
can you help me <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/public/style_emoticons/'>http://www.birt-exchange.org/org/forum/public/style_emoticons/</a><#EMO_DIR#>/tongue.gif
and thanks again
johnw
Create your Data Set with the query:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select
x,
y,
z
(x + y + z) as w
from
table
</pre>
<br />
This will create a new data set with 4 columns, x, y, z, w.<br />
<br />
You can then filter this in 1 of 4 ways.<br />
<br />
1. Modify the query to look like:<br />
select x, y, z, (x + y + z) as w from table where (x + y + z) > 0;<br />
<br />
2. Double click on the Data Set in BIRTs Data Explorer. Go to the Filters menu. Click new, and set expression to be w, set the operator to Greater Than, and the Value to 0.<br />
<br />
3. Create a table in your report based on your data set. Go to the Filters Tab in the Property Editor when you have the Table selected. Use the same condition as in #2.<br />
<br />
4. You could use a Visibility expression such as (w < 1), which will return TRUE if w is less than 1, hiding the row.<br />
<br />
Any of the 4 above methods will work. You will probably want to use #1 since this pushes the filtering off on the database, and the database will do this much faster than BIRT will.
caribe
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="97017" data-time="1330528623" data-date="29 February 2012 - 08:17 AM"><p>
Create your Data Set with the query:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select
x,
y,
z
(x + y + z) as w
from
table
</pre>
<br />
This will create a new data set with 4 columns, x, y, z, w.<br />
<br />
You can then filter this in 1 of 4 ways.<br />
<br />
1. Modify the query to look like:<br />
select x, y, z, (x + y + z) as w from table where (x + y + z) > 0;<br />
<br />
2. Double click on the Data Set in BIRTs Data Explorer. Go to the Filters menu. Click new, and set expression to be w, set the operator to Greater Than, and the Value to 0.<br />
<br />
3. Create a table in your report based on your data set. Go to the Filters Tab in the Property Editor when you have the Table selected. Use the same condition as in #2.<br />
<br />
4. You could use a Visibility expression such as (w < 1), which will return TRUE if w is less than 1, hiding the row.<br />
<br />
Any of the 4 above methods will work. You will probably want to use #1 since this pushes the filtering off on the database, and the database will do this much faster than BIRT will.<br /></p></blockquote>
<br />
<br />
but see, w is not a simple (x + y + z), w is the same y if y = 1,3,5,2<br />
w = <strong class='bbc'>0</strong>,1,3,5<br />
<br />
how can I do this query w = y but the first row of w is 0 .... or how can I compare the rows of y ?(the first whit the second, de second whit the thirth......)
johnw
It doesn't really matter HOW you are getting w. You're question is how do you filter on w.
If you're asking how can you set the value of w to the last iteration of y, take a look at the following example. In it, there is script on the Data Sets onFetch event that sets a global variable with the value of a current rows value. There is a computed column in the Data Set that retrieves that global variables value, which will always pull the last value since it will be retrieved before the global variable is updated. Then, in the Table in the report, there is a Filter that will not display the row if that last value is 0.
Let me know if that is what you are asking for.