Grouping Multi-value parameter

  • I want to implement a parameter for a ChargeCode, so that users can select:

    either:

    AreaGroupA

    or

    AreaGroupB

    The ChargeCode field contains numeric data,which I want to group as follows:

    Where ChargeCode Value = 1, then parameter choice to display = AreaGroupA

    and

    Where ChargeCode Value > 1, then parameter choice to display = AreaGroupB

    It's that simple, but I can't get my head around it.

    Any help gratefully recieved.

    Cheers.

  • =IIF(Fields!ChargeCode.Value = 1,"AreaGroupA","AreaGroupB")

  • Thanks - as you can tell, I'm pretty new at SSRS expressions!

    Cheers.

  • Tried adding

    =IIF(Fields!ChargeCode.Value = 1,"AreaGroupA","AreaGroupB")

    to the parameter, but SSRS won't allow parameters to reference fields. Is there another way to do this for example by the use of a filter and if so, how?

    I've been searching online for ages for a solution to this one, but I haven't got anywhere.

    Basically, I'm trying to get around basing the parameter on a query/dataset as the ChargeCode has millions of rows and I just want to be able to have a parameter that filters AreaGroupA and AreaGroupB as above. i.e. all those millions of rows where ChargeCode = 1 should be selectable as AreaGroupA and the other million s of rows as AreaGroupB. The ChargeCode field is also an integer field, but I'm not sure if this complicates anything.

    If anyone can help it would get me out of a pickle.

    Cheers.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply