1 Reply Latest reply on Dec 13, 2012 5:21 AM by SriniVEERAVALLI

    How To Calculate TOPN variable...

      Hi All,

      I have display Top N Sales Dynamically.Like user enter 1 value it will display top 1 record or user enter 5 i want display top5.

      How to Archive this requirement.....
        • 1. Re: How To Calculate TOPN variable...
          In prompt pull Sales column->SQL Results
          use query something similar to below

          SELECT TOPN("Sales",10) FROM "SubjectArea" order by Sales

          @Set Variable->Select Presentation Variable and give name as N

          In your report at Criteria tab pull sales column and change the fx or expression as below

          TOPN("Sales", cast(@{N}{2} as int))

          This works for sure do the changes were ever required

          If works pls mark as correct else you might configured wrongly ;)
          1 person found this helpful