MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now Learn More
Quote from: MFGF on 10 Nov 2025 02:29:43 PMHi,
It appears there is a row for each record, regardless? Your case statement in the data item expression (ie a calculation) is generating a 'Pass' value for those rows that have 'Value 1' in Field A, and a null value for those rows whose Field A is something other than 'Value 1'. It sounds like you only want to see rows with Pass values (ie rows that have 'Value 1' in Field A)? If this is the case, you would generally use a filter in your query to allow the rows you require and to omit the rows you don't need. It is possibly as simple as coding a filter expression [Field A] = 'Value 1'
Of course, it's quite possible I'm missing something, but if so, maybe you could provide more detail and explain exactly what you need to do?
Cheers!
MF.
Quote from: bus_pass_man on 10 Nov 2025 06:22:31 AMSince you have not documented the nature of the data I can't provide much guidance other from my surmises based on the usual patterns.
I really don't think I have encountered a situation where an expression would return multiple rows due to an expression when there are only one record for an entity.
I think it possible that there are multiple records for entities in your db. You would need to know this. Knowing the nature of the data and the metadata would determine how to approach the problem, which would require you to step back and not seek some method to tweak your expression but to seek to define the problem more clearly. One thing you would need to do to accomplish this would be to understand the nature of your data.
I think it possible that, given the likelihood of there being multiple records for any particular entity, you are seeking to have your report return the latest record for an entity, where the value of a column is some condition.
It is possible that the time state of a particular record is captured in a column.
If so, there is the possibility that the latest record could have a value which is not (as in your case) 'passed'. It is not clear what you want to do in that case.
----
I think your situation deals with two common patterns of behaviour. The first being a report author trying to model. This sort of calculation should be better dealt with in the model or, even better, during ETL. The second being an over-abstraction of the problem as data has semantic meaning which would partially define the bounds of the problem.
| BSP Software Documentation |
| MetaManager Documentation and Knowledgebase |
| Version Control Documentation and Knowledgebase |
| BSP Software | Resources | About Us | ||
| MetaManager | BSP Software Training | BSP Software | ||
| Integrated Control Suite | YouTube Channel | Micro Strategies Inc | ||
| Security Migration | IBM Cognos | |||
| Integrated Management Suite | ||||