Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Compair value for current row with the value of next row in a table
Polly
Hi all<br />
<br />
i want to compair value from te current row with the value of the next row in a table. And hide the row if the value is the same.<br />
<br />
<strong class='bbc'>For example:</strong><br />
<br />
Row 1 Pump life_a<br />
Row 2 Pump life_f<br />
Row 3 Pump price_a<br />
Row 4 Pump price_f <br />
Row 5 Pump quality_a<br />
<br />
<strong class='bbc'>Must show:</strong><br />
<br />
Row 1 Pump life<br />
Row 2 Pump price<br />
Row 3 Pump quality_a<br />
<br />
I hope somebody can help me with this
Find more posts tagged with
Comments
mwilliams
Hi Polly,
So, the '_a' and '_f' parts will be there in the original data and you want that to go away if they're the same and stay if they're not repeated?
Polly
in my database if got
Row 1 Pump life_a
Row 2 Pump life_f
Row 3 Pump price_a
Row 4 Pump price_f
Row 5 Pump quality_a
Row 6 Pump looks_a
Row 7 Pump looks_f
I have to compair the text before the _ and if it is the same as the next row i have to hide one of these rows and the _a or _f part.
if the text in next row isn't the same (row 5 and 6) if have to showe the hole text.
mwilliams
Polly,
What kind of dataSet is this? JavaScript? SQL? Flat File? XML? etc?
Also, do the values ever repeat? Or will all the "life" values always be together in the list? And all the "price" values? etc?
Let me know. Thanks.
Polly
Hi Micheal,<br />
<br />
the dataset is a mysql database. And and the "price" or "Life" data is random strored in the database. But they are only stored once. <br />
<br />
<strong class='bbc'>So you won't see:</strong><br />
Price_a<br />
Price_f<br />
Life_a<br />
Life_ f<br />
Price_a
mwilliams
Polly,
Since they're not repeated, you could group your report on all but the last 2 characters of that column, then add an aggregation to your table on the group that counts the rows in the group. If it's 1, you'd show the actual row value, if it's greater than 1, you'd show just the base value. Let me know if this is confusing. I'll make an example if you tell me what version of BIRT you're using.
Polly
Micheal,
it will be verry nice if you would help me out. I'm using Version: 2.5.2 of birt.
And thank you for the efford.
Polly
Micheal,
i have managed to solve it
thanks for the tips
mwilliams
Polly,
Sorry for the delay. I was out sick at the end of last week and had upgraded to Windows 7 as well, so I had to re-download all of the designers. I had the example ready to go, just hadn't posted it yet. If you would still like to see it, I'll post it still.
How did you accomplish it?