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)
Get columnA from table where max columnB of table?
coderman77
<p>I have a requirement where above a table of cars and prices i need to show the most expensive car. i know i could do it in a query, but the query to come up with the car/price table is a long and complicated one so i would like to avoid that.</p><p> </p><p>so what i think i need to do is grab the "Car" column from the table where "Price" column is the highest value.</p><p> </p><p>Is that possible?</p><p> </p><p>Thanks!</p>
Find more posts tagged with
Comments
micajblock
<p>Yes. Create an aggregation for max price. The create another aggregation for First car and filter on price == the max price. If you tell me the version of BIRT you are using I can build a quick example for you.</p>
coderman77
<div>Actuate BIRT Designer Professional </div><div>Version: 11.0.4</div><div>Build id: 20121023</div>
coderman77
<p>man having a **** of time getting this to work. the 1 caveat i didnt mention was that the table is hosted in a library, and that table is then brought into a report from the library. </p><p> </p><p>i was able to add the 2 aggregations to the table in the library but unable to add a "Data" or "Dynamic Text" box any where on the report that has access to either of those. They either dont show up in the list or cause a Buffer Overflow exception in the report.</p><p> </p><p>I also had to add them as physical columns in the table in order for the report to be able to see them as bindable columns, but i set them to hidden in the library so they dont actually show up. </p>
micajblock
<p>Sorry for the delayed response (a bit busy). What is the reason for the table being in a library. How is it being re-used? If I recall correctly only a very limited things can be changed to tables from libraries. </p><p> </p><p>In any case my original thought did not work for me either (it has to do with the order of events). In any case attached is an example that does work. It uses report variables. I hope this helps.</p>