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)
computed column
kvram25
<p>Hi</p>
<p> </p>
<p>I have built a report with SQLEXPRESS data source. The column structure of database View is as follows:</p>
<p>IDX, DATE, SIGNAL, Value</p>
<p> </p>
<p>Let us say there are 10 types of signal in the table view. I want a computed field that computes as follows:</p>
<p>COMPVAL=Sig9+Sig10-Sig8.</p>
<p>Singal1 to Signal7 retain their original value.</p>
<p>How to do this at Datasource level and at Chart level.</p>
<p>I tried the Computed column but field list shows the same columns as mentioned above as the View headings.</p>
<p> </p>
<p>Please suggest solution</p>
<p> </p>
<p>Regards,</p>
<p>Ram</p>
<p> </p>
Find more posts tagged with
Comments
micajblock
<p>In SQL you group on signal and the use case statements for the aggregations. In BIRT you group on signal and use aggregation report items and use the filter.</p>
kvram25
Hi
I tried the second method suggested by you.
1. Grouped a table based on the Dataset with following filters
grp1: SignalName in (Signal8, Signal9,signal10)
grp2: Date= Today
Thus I am able to get today's data for the selected signals.
Also created an aggregate field but I am only able to SUM/ AVG etc on the selected group
But now I want to a calculation COMPVAL=Sig9+Sig10-Sig8
So I am not able to figure out how to do this.
Pls advise.
Ram
kvram25
<p>Sorry</p>
<p>What I meant vas to compute a new field COMPVAL based on VALUEs of the selected signals for Today as per following Cormula</p>
<p>COMPVAL=VAL9+VAL10-VAL8</p>
micajblock
<p>What version of BIRT are you using?</p>
kvram25
<p>I am using BIRT Designer Professional 4.2.3</p>
kvram25
<p>Hello Sir,</p>
<p> </p>
<p>I am attaching the sample requirement in XL sheet for better understanding.</p>
<p> </p>
<p>Ram</p>
micajblock
<p>See attached example. I left the temporary aggregations in the report so you can see how it is done. Once you create the aggregations you can delete them from the report, the bindings to the table will remain. Hope this helps.</p>
kvram25
<p>Thanks Mr Block</p>
<p>Your suggestion worked.</p>
<p> </p>
<p>Ram</p>