1 Reply Latest reply: Dec 12, 2012 11:21 PM by Srini VEERAVALLI RSS

    How To Calculate TOPN variable...

    962252
      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...
          Srini VEERAVALLI
          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 ;)