COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: patrickthatcher on 26 May 2015 06:46:59 PM

Title: Rank based on user selected measure?
Post by: patrickthatcher on 26 May 2015 06:46:59 PM
howdy.  I have a request for a ranking report where the user can select the measure to rank on.  I'm missing something because the rank = 1 for all records.  Can anyone see where I've gone wrong?

I have a Value prompt that is setup as such:
Parameter: RankField

Static choices:
Use: [Consolidated View].[Facts].[Confirmed Sales $]  Display: Confirmed Sales $
Use: [Consolidated View].[Facts].[Item Sold]               Display: Item Sold

Rank field:
Type: Data Item
Name: Rank
Expression: Rank(?RankField?)

I tried the Expression as Rank(ParamValue('RankField')) but this generated an error

tia
Title: Re: Rank based on user selected measure?
Post by: navissar on 28 May 2015 03:47:06 AM
Try rank(#prompt('RankField','token')#)
Title: Re: Rank based on user selected measure?
Post by: patrickthatcher on 28 May 2015 03:48:59 PM
Sweet it worked.  Thanks so much