Hi,
I have a requirement in which I need to have 2 sets of data in a list report. To be specific, I have 8 columns in the list, first 4 columns will have the data for the entire table, rest 4 columns will be of a subset of the whole data. e.g. if first 4 will have counts or some calculated values of all the ADDRESS, the 2nd 4 columns will have counts/calculated values for the "ADDRESS NOT HAVING A ZIP CODE".
Can anyone please let me know how I can do this? If I am applying filter for last columns, I would miss the records for the first 4 columns.
I am very new to Cognos, any help will be really appreciated.
Thanks in advance !!!
Are you using a relational source? If so, then perhaps your 2nd group of columns could be expressions that would only populate if the address doesn't have a zip code.
All branches of a "case" or "if" must resolve to the same datatype, so if you have a numeric column you can either populate the data item with that for null zip codes or else set it to zero.
Also, "not having a zip code" is a little vague. This could mean the value is null or zero or blank or some other value. The condition to determine if there is a zip code or not would obviously be an important aspect. I just assumed null in my sample expression.
case
when [zipcode] is null then [YourNumericDataItem]
else 0
end