Dear Experts,
How to get the last value of the column in cognos list report.
could any one help me out this.
Best Regards
What makes it the last value in the list? Is the list sorted in anyway? If, for example, it's sorted on date you could create a second query to find the maximum date then link that query to the first one to find the last value.
Hi ,
thanks for reply, yes its based on date, can you explain me how we can do? i am new to cognos.
Best Regards
Ok, this is fairly broad brush strokes, but I'll give it a go. Let's say the query you've got at the moment has got two fields in it:
[YourTable].[Date] and [YourTable].[Attribute]
You could create a second query that just has one field in it - a calculation of maximum([YourTable].[Date])...give it a name like MaxDate
In your query design you can now drag in a join, which will create a third query, and will have two placeholders. Drag your first query into the first placeholder and you second into the other. Double click on the join and link Query1.Date to Query2.MaxDate
In the new third query drag in Date and Attribute from Query1 - you should now just see the records for the latest date.
It's hard to describe, but hopefully if you have a play around you should be able to see what I'm trying to describe.