COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: jsibley on 22 Oct 2024 12:46:16 PM

Title: Concatenating columns into one after using coalesce
Post by: jsibley on 22 Oct 2024 12:46:16 PM
I have 4 competencies that I've pulled from 4 different queries.  I did multiple joins and was able to get them be in one sing row after I used coalesce and used a 0...n for cardinality in both directions.  Now I'm at the point of trying to add them together into a single cell but I'm getting an error message I've never seen. 

RSV-VAL-0010 Failed to load the report specification.CCL_ASSERT(m_nodelImpl!=NULL);  The error I get is the same if I try adding all 4 together as it is when I only add 2. 
Title: Re: Concatenating columns into one after using coalesce
Post by: MFGF on 22 Oct 2024 02:23:31 PM
Quote from: jsibley on 22 Oct 2024 12:46:16 PMI have 4 competencies that I've pulled from 4 different queries.  I did multiple joins and was able to get them be in one sing row after I used coalesce and used a 0...n for cardinality in both directions.  Now I'm at the point of trying to add them together into a single cell but I'm getting an error message I've never seen. 

RSV-VAL-0010 Failed to load the report specification.CCL_ASSERT(m_nodelImpl!=NULL);  The error I get is the same if I try adding all 4 together as it is when I only add 2. 

When you refer to adding them together, is that a mathematical addition (so you want to sum numbers) or are you trying to concatenate strings together? What are the data types of the items you are using in the calculation?

Cheers!

MF.
Title: Re: Concatenating columns into one after using coalesce
Post by: jsibley on 22 Oct 2024 02:41:55 PM
No, it's comments.  It's like Jane did a great job on being a team player....
Title: Re: Concatenating columns into one after using coalesce
Post by: jsibley on 22 Oct 2024 02:54:22 PM
I've also learned that it will merge them together if there are no nulls, but when there is a null then it gives me nothing.  So if 3 out of the 4 competencies have values and I don't ask it to add the 4th competency it works, but when I add in the last one, that does have a null, it gives nothing.
Title: Re: Concatenating columns into one after using coalesce
Post by: MFGF on 22 Oct 2024 03:20:34 PM
Quote from: jsibley on 22 Oct 2024 02:54:22 PMI've also learned that it will merge them together if there are no nulls, but when there is a null then it gives me nothing.  So if 3 out of the 4 competencies have values and I don't ask it to add the 4th competency it works, but when I add in the last one, that does have a null, it gives nothing.

Re the nulls, that would be expected behaviour - a null denotes an unknown value. You'll need to replace the nulls or check for them in your expression.

Cheers!

MF.