COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: zedpower on 29 Jul 2020 03:30:37 AM

Title: Prompt with wildcard in multiple tables
Post by: zedpower on 29 Jul 2020 03:30:37 AM
Hello

New here, please move if this question is not in the right place.

I would like to use a prompt with a wild card, like 20200720%. For example this means there are 5 numbers from 202007290001 to 202007290005. Each number got the same columns but different values. I would like to see those values in 5 separate tables for the 5 numbers without having to input all 5 of the numbers.

For example
202007290001 HF 20, HP 40, LF 23, LP 43
202007290002 HF 14, HP 32, LF 12. LP 33
etc.

And I have to put these in their own tables.

Please see attached for the desired result.

The numbers are not always in order but the first 8 numbers are always the same.


Is there a way to do this? Thank you very much
Title: Re: Prompt with wildcard in multiple tables
Post by: dougp on 29 Jul 2020 01:00:00 PM
None of your sample data sets contain the same data, so it's difficult to see what source data should produce what results.

I think what you are looking for is a Repeater or a Repeater Table.
Title: Re: Prompt with wildcard in multiple tables
Post by: BigChris on 30 Jul 2020 01:47:10 AM
Is that number a genuine number, or is it a string? If it's a number, you'll want something like this in your filter:
[YourField] between ?Starting Number?* 10000 and (?Starting Number * 100000)-1

If it's a string it'll need to be more like this:
substring([YourField],1,8) = ?Starting Number?