Skip to Content
avatar image
Former Member

Design studio Filter Datasource/Cross tab based on Value

Hi Expert,

We have developed an design Studio report in which we have cross tab to display the dat source data.

like below

Now I have an requirement to place a button to filter the values those don't have value in C column.

By clicking the Button it should filter the entire table to display the customer who don't have any value in C column like below.

Please Suggest some idea or solution to achieve this scenario.

Thanks!

Regards,

Ramesh Jothimani

xobyl.png (11.6 kB)
tpooz.png (6.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Nov 08, 2016 at 06:31 AM

    Hi Ramesh,

    You can use below code to filter the customer list that has no value.

    var Customer = DS_1.getMembers("CUSTOMERS", 100);

    var cust_list="";

    Customer.forEach(function(element, index) {

    if(DS_1.getData("006EI4YZGAHG78NEXGZORKSPI", element.internalKey).value<= 0)

    { cust_list=cust_list+element.externalKey+";"; }

    });

    DS_1.setFilterExt("CUSTOMERS", cust_list);


    This method is only used when you have few customers in the list. Because it will affect the performance of your dashboard.

    You can use BEX conditions to filter the customers. For using BEX conditions you can refer this blog

    https://blogs.sap.com/2015/07/13/working-with-bex-conditions-in-sap-businessobjects-design-studio/

    Using of conditions on measures will be the best way to achieve your requirement.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 18, 2016 at 07:53 AM

    Hi Poovarasan,

    I have tried with BEx but it will show selection during the report refresh, so I hope the script will help us to achieve this.

    I tried you script but it giving me an error message.

    Error during script processing. Contact the Application Designer to resolve the issue

    Please help me on this and also can we use this script in button to execute it.

    Thanks!

    Regards,

    Ramesh Jothimani

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ramesh,

      Can you show the script you have used in your application?

      So I can know what may be the reason for the error.

      Thanks,

      Poovarasan

  • avatar image
    Former Member
    Nov 18, 2016 at 08:34 AM

    Hi Poovarasan,

    Please find the code that I used.

    var Customer = DS_1.getMembers("0MATERIAL", 100);

    var cust_list="";

    Customer.forEach(function(element, index) {

    if(DS_1.getData("00O2TGZ8RNLJA295794PG2ID2", element.internalKey).value<= 0)

    { cust_list=cust_list+element.externalKey+";"; }

    });

    DS_1.setFilterExt("0MATERIAL", cust_list);

    Thanks!

    Regards,

    Ramesh Jothimani

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 18, 2016 at 10:28 AM

    Hi Ramesh,

    I have given generalized scripting on my approach.

    In the If condition of code the values must be a key pair value to select data cell like below.

    if(DS_1.getDataAsString("75NENIHH023XRIQOATBQLRM8R", {"0MATERIAL": element.internalKey})== "")

    Sorry that i haven't given exact code and you need exclude members that don't have value. So while populating value you need to add "!"

    cust_list=cust_list+"!"+element.externalKey+";";

    The code will work after these changes.

    And Fur using the BEX condition, you don't need any input prompt in refresh. Hard code the condition with value zero and activate it in design studio when needed for the datasource.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded