If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Not Showing Certain Rows for a Listing or Chart

Started by HelloCognos, 23 Jul 2018 07:20:14 AM

Previous topic - Next topic

HelloCognos

Hi,
I have a chart that has a data item as below. I'm trying to show only the first two Step Types shown as Electronics Processing and Paper Processing when
the situation is as following,
case
when ([STEP_TYPE] <= 'Feb 10, 2018') then
(
case
when([STEP_TYPE]='Electronics Processing')then('01. Electronics Processing')
when ([STEP_TYPE]='TV Processing')then('02. TV Processing')
when ([STEP_TYPE]='Paper Processing')then('03. Paper Processing')
else
([STEP_TYPE])
end
)
else
(case
when([STEP_TYPE]='Electronics Processing')then('01. Electronics Processing')
when ([STEP_TYPE]='Paper Processing')then('02. TV Processing')
else
(NULL)
end
)
end

So, the problem is I need to eliminate the row and therefore not to show it in the chart rather than inserting NULL
as you can see in the attachment.

Any ideas how to change the case statement above to not to show the Paper Processing in this case if the close date is after Feb 10, 2018?

Thanks in advance for your time.

sdf

there were no attachments.
What type of chart are you using?

HelloCognos


Lynn

Quote from: HelloCognos on 23 Jul 2018 07:20:14 AM
Hi,
I have a chart that has a data item as below. I'm trying to show only the first two Step Types shown as Electronics Processing and Paper Processing when
the situation is as following,
case
when ([STEP_TYPE] <= 'Feb 10, 2018') then
(
case
when([STEP_TYPE]='Electronics Processing')then('01. Electronics Processing')
when ([STEP_TYPE]='TV Processing')then('02. TV Processing')
when ([STEP_TYPE]='Paper Processing')then('03. Paper Processing')
else
([STEP_TYPE])
end
)
else
(case
when([STEP_TYPE]='Electronics Processing')then('01. Electronics Processing')
when ([STEP_TYPE]='Paper Processing')then('02. TV Processing')
else
(NULL)
end
)
end

So, the problem is I need to eliminate the row and therefore not to show it in the chart rather than inserting NULL
as you can see in the attachment.

Any ideas how to change the case statement above to not to show the Paper Processing in this case if the close date is after Feb 10, 2018?

Thanks in advance for your time.


Can you filter out the data from the query?

HelloCognos

Good question. Yes, I was thinking if I used something like '-1' in the case statement, then I can filter it out in the Query of the Chart when it hits certain condition.

How is that?

Thanks

Lynn

Quote from: HelloCognos on 26 Jul 2018 10:25:21 AM
Good question. Yes, I was thinking if I used something like '-1' in the case statement, then I can filter it out in the Query of the Chart when it hits certain condition.

How is that?

Thanks

You could just filter it directly I think without regard to the case statement. I am assuming this is a relational package (not a cube or DMR).


(
  [Your Close Date] <= 'Feb 10, 2018'
  and
  [STEP_TYPE] not in ('Electronics Processing', 'Paper Processing')
)
or
(
  [Your Close Date] > 'Feb 10, 2018'
)


This filter expression should remove all the unwanted step types for records with a close date on or before the 10th of February. For dates after 10th February there will be no further restriction. The "or" between these two blocks of code will ensure that one or the other applies to all records processed.

Your original post indicates when ([STEP_TYPE] <= 'Feb 10, 2018') then but I assume this is a typo and you meant to compare to a close date field instead.