COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kkhatod on 24 May 2016 08:27:39 AM

Title: Dimensional Functions : How to retreive the members dynamically
Post by: kkhatod on 24 May 2016 08:27:39 AM
Hi All,

One help needed for the below query which I am using in my data item to retreive the data for my stores :

set([Stores],item(children([Stores],0))

the above query gives me the 1st member of my stores but I need this in dynamic way so that all my stores should get retrieved. Can you please help me .
Title: Re: Dimensional Functions : How to retreive the members dynamically
Post by: MFGF on 24 May 2016 11:17:45 AM
Quote from: kkhatod on 24 May 2016 08:27:39 AM
Hi All,

One help needed for the below query which I am using in my data item to retreive the data for my stores :

set([Stores],item(children([Stores],0))

the above query gives me the 1st member of my stores but I need this in dynamic way so that all my stores should get retrieved. Can you please help me .

Can you explain this requirement? You want all store members and the first child of each store? Something else? Can you provide a clearer description of what you're trying to do?

MF.
Title: Re: Dimensional Functions : How to retreive the members dynamically
Post by: kkhatod on 24 May 2016 11:36:10 PM
Hi,

Yes I need to retrieve all the members of my Store. As you see the current code is restricting one store to come but i need all the values of my store.

Title: Re: Dimensional Functions : How to retreive the members dynamically
Post by: MFGF on 26 May 2016 03:12:23 AM
Quote from: kkhatod on 24 May 2016 11:36:10 PM
Hi,

Yes I need to retrieve all the members of my Store. As you see the current code is restricting one store to come but i need all the values of my store.

Hi,

If all you need is a set of store members, wouldn't you just bring in the store level to your report? Why are you using item(children([Stores]),0) if you just need all store members?

MF.
Title: Re: Dimensional Functions : How to retreive the members dynamically
Post by: kkhatod on 26 May 2016 11:58:39 PM
Hi,

Yes correct, but I need to maintain my code in that way only, since I am using the item function here & because of this its mandatory to pass a index value (0) in the same due to this it is only showing me the first store rather then all the stores.. can we rebuild the same logic in the same code, so that I can see all of my stores.
Title: Re: Dimensional Functions : How to retreive the members dynamically
Post by: MFGF on 31 May 2016 11:27:19 AM
Quote from: kkhatod on 26 May 2016 11:58:39 PM
Hi,

Yes correct, but I need to maintain my code in that way only, since I am using the item function here & because of this its mandatory to pass a index value (0) in the same due to this it is only showing me the first store rather then all the stores.. can we rebuild the same logic in the same code, so that I can see all of my stores.

I don't understand what you're saying here, sorry. If you only need the store members, just bring in the store level. Why do you feel you need to use an item() function? What is the requirement that warrants this?

MF.