Skip to Content
Author's profile photo Former Member

WebI Trick: Top N data for any integer N using Entry field Input controls

There are some discussions about selecting top N data recently. I have been haunted by the idea. In this post, I will show you how to choose top N data using input controls without building extra tables. In addition, you can specify any integer value for N to see the top N data.

I utilize eFashion Universe for demonstration purposes. I also am assuming that you are somewhat familiar with Webi 4.0 – Rich Internet Application Viewing Mode.

Step 1: Build a Webi report using eFashion Universe

/wp-content/uploads/2014/02/step1_389938.png


Step 2: Create a new variable (Rank) to show the ranking of sales revenue in the table

/wp-content/uploads/2014/02/step2_390008.png


Step 3: Sort sales revenue in the table from the highest to the lowest (descending)

/wp-content/uploads/2014/02/step3_390009.png


Step 4: Create a new input control on variable Rank to show top N Sales revenue

Choose variable Rank as an object to filter data. Then click Next.

/wp-content/uploads/2014/02/step4_390010.png


Define the input control as shown in the picture below. Click Next.

/wp-content/uploads/2014/02/step4_1_390011.png


Select the report element to use with the input control. Click Finish.

/wp-content/uploads/2014/02/step4_2_390012.png


Now enjoy the result.


Top 3 sales revenue by SKU desc

/wp-content/uploads/2014/02/e1_390013.png


Top 5 sales revenue by SKU desc

/wp-content/uploads/2014/02/e2_390014.png


Top 10 sales revenue by SKU desc

/wp-content/uploads/2014/02/e3_390015.png

Thanks,

Huu Nguyen

Assigned tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sabrina Brueck
      Sabrina Brueck

      Thanks for the post, this works really fine.

      But when I save the report and open it again, the Top N Input Control doesn't work anymore. And more, all other input controls don't work either.

      We have BO 4.0 SP 4, could this be a problem?

      Regards,

      Sabrina

      Author's profile photo Former Member
      Former Member

      You shouldn't have any issue with those input controls. My guess would be a glitch on the server. You can try close everything and try it again.

      Author's profile photo Sabrina Brueck
      Sabrina Brueck

      I think I found the problem.

      The requirement in my project was: When the report opens, all data should be displayed. And then the user can choose if he wants top n or not. For that reason, I safed the report without any number in the entry field. And this doesn't work.

      Workaround: Type 100000 and safe the report, so that all data is displayed when the report opens. And everything works fine.

      Author's profile photo WILLIAM MARCY
      WILLIAM MARCY

      Great Webi trick !

      You've been added to Webi 4.x tricks : summary for a better visibility. Keep posting !

      William

      Author's profile photo Sven Oehme
      Sven Oehme

      Great,

      but I think this input control is not really userfriedly. We use this kind of top-ranking with a fader-element as input.

      Sven

      Author's profile photo Former Member
      Former Member

      fader element?

      Author's profile photo Sven Oehme
      Sven Oehme

      Hello Thomas,

      yes. If you use input controls in combination with a measure, it is possible to use fader controls. For example you use a measure as input value for a top x ranking.

      Greets Sven

      Author's profile photo Neil Mitchell-Goodson
      Neil Mitchell-Goodson

      When you say Fader, are you referring to the Slider input controls?

      Author's profile photo Sven Oehme
      Sven Oehme

      Yes I do. Sorry for that.

      Author's profile photo Neil Mitchell-Goodson
      Neil Mitchell-Goodson

      No worries, good to confirm in case people go looking for Fader input controls and can't find them.

      Thanks for confirming 🙂

      Author's profile photo Former Member
      Former Member

      That's the same path I was going down on 🙂