Skip to main content

button dropdown select dimensionvariables

 

Dear Pedro,

 

Did you filter the components you want to apply the filters from your dropdown button for?

I attach the screenshots; i have just created a dropdown based on manual input, which filters on an OLAP table.

 

Comparison:

compare 

Button Dropdown:

Dropdown config 

Component Filter:component-filter 

Note: I am not sure if i understand your issue fully but in case you want to choose actual column values from the button dropdown, you need "Load Entries" instead of "Manual Input":

 

Config of button dropdown if load entry:

button-dropdown-load-entries 

Component filter if load entry:component-filter-load-entryDropdown&OLAP:

result-load-entry  

If you have multiple manual values:

Config:

mult-confComponent Filter:

component-filter-multipleResult OLAP:

result-olap 

Variables:

variablesYou have to apply the component filter for every component you want to filter for based on the button dropdown.

 

Yours,

Zsolt


Dear Zsolt,

 

Thank you very much for your time.

 

I want to do a Process benchmarking with Button dropdown "Select dimensions to compare" and in the left and right I want to put two values to compare the process. For exampe, 

I have two dimensions: Country and City. 

And in the left and right, I want to have 'Spain' and 'Germany' when I select 'Country' like dimensions and 'Madrid' and 'Berlin' when I select 'City'. 

 

Best regards,

Pedro.


Dear Zsolt,

 

Thank you very much for your time.

 

I want to do a Process benchmarking with Button dropdown "Select dimensions to compare" and in the left and right I want to put two values to compare the process. For exampe, 

I have two dimensions: Country and City. 

And in the left and right, I want to have 'Spain' and 'Germany' when I select 'Country' like dimensions and 'Madrid' and 'Berlin' when I select 'City'. 

 

Best regards,

Pedro.

Dear Pedro,

 

I see.

  • Create a button dropdown with Load Entries and add the following formula:

REMAP_VALUES(TO_STRING(GENERATE_RANGE ( 1 , 0 , 1 )), '0','Company Code'], #'1', 'Vendor Name'], NULL)

This will create a list of the dimensions which will allow you to use these in the button dropdown. You can edit the bold part to 'Country' and 'City'. Set to write to a variable of yours.

config-b1With this so far, you have the first part:b1-part1

  • Create two more dropdowns for left and right:

You need to use Load Entries dropdowns and add the formulas for both dropdowns:

CASE WHEN '<%= Test_var1 %>' = 'Company Code'

THEN "EKKO"."BUKRS"

WHEN '<%= Test_var1 %>' = 'Vendor Name'

THEN "EKKO"."LIFNR"

ELSE NULL END

Replace the bold parts to Country and City, and also replace their respective data model table and column name. This code will let you see all the countries or cities available in those columns, based on what you chose at the first dropdown. If you choose something in the left or right dropdown, it will also set an another variable, which will be one of the needed input to our component filter. So far:

Left dropdown:

dropdown config-left 

Right dropdown:

right-dropdownNote: the difference is the set variable, it needs to be different.

Result so far:

result-sofar 

  • Add a component, e.g an OLAP table and create dimensions and KPI-s based on what KPIs you want to benchmark.

 

  • For the left side components, add the following filter:

FILTER CASE

WHEN

'<%=Test_var1%>' = 'Company Code' THEN "EKKO"."BUKRS"

WHEN

'<%=Test_var1%>' = 'Vendor Name' THEN "EKKO"."LIFNR"

ELSE NULL

END IN (<%= Test_var1_1 %>);

Replace bold parts, pay attention we have 2 different variables in this code. Replace the Comp. Code and Vendor Name and its table-columns to your country and city and its table-columns.

  • For the right side components, add filter:

FILTER CASE

WHEN

'<%=Test_var1%>' = 'Company Code' THEN "EKKO"."BUKRS"

WHEN

'<%=Test_var1%>' = 'Vendor Name' THEN "EKKO"."LIFNR"

ELSE NULL

END IN (<%= Test_var1_2 %>);

Note: Replace all needed fields and pay attention that you need the bold variable, the one that you set at configuring the right side of the button dropdowns.

Result Company Code:

result-ccodeResult Vendor Name:

result-vendor-name 

Some more details:

In this solution if you deselect, you will have empty variables, so you always have to select something left and right side as well.

If you switch between the dimensions at the first dropdown, previous variable values remain stuck, so you need to select the desirable values again at the second row of dropdowns.

I tried to make this work with manual inputs but when you are switching dimensions then all the manual inputs remain there as an option to choose from e.g. You choose Country but Berlin and Madrid remains there as an option to choose from which could be confusing.

You can use the search function if you have dozens of countries and cities. If you strictly want to restrict the benchmarking inputs, place a filter to the second row button dropdowns like the following:

FILTER "EKKO"."BUKRS" IN ('0001', '0005');

The remaining values get greyed out and remain unselectable.filter-inputsIf you do not want analysts or members to see other options you can modify the second row of button dropdowns formula to something like:

CASE WHEN '<%= Test_var1 %>' = 'Company Code'

THEN REMAP_VALUES("EKKO"."BUKRS", K'0001', '0001'], 0'0005','0005'], NULL)

WHEN '<%= Test_var1 %>' = 'Vendor Name'

THEN "EKKO"."LIFNR"

ELSE '' END

 

This way you will only be able to choose from 0001,0005 and NULL.

Then you can make a filter to those left and right dropdowns so that they can not choose NULL: FILTER REMAP_VALUES("EKKO"."BUKRS", U'0001', '0001'], 0'0005','0005'], NULL) IS NOT NULL;

filtered-dynamic-input 

Hope it helps.

Yours,

Zsolt Borbély


Dear Zsolt,

 

It's not working when I put the component filter, I think it's a problem with the variables, how did you define them? When I don't put the filter, it works fine.

 

Thank you.

 

Best regards,

Pedro.


Dear Zsolt,

 

It's not working when I put the component filter, I think it's a problem with the variables, how did you define them? When I don't put the filter, it works fine.

 

Thank you.

 

Best regards,

Pedro.

Dear Pedro,

 

Created the variables as 'Text Replacement', leave it blank.

Variables then get their values based on what you choose in the dropdown button.

If you could give more specifics on which part is not working, i could help more.

 

Yours,

Zsolt Borbely

 


Dear Zsolt,

 

Perfect, it work. One question more: when I set a value of a variable ('Country'='Spain') and change the dimension, the new dimension catch the value of the variable that had selected before. An example:

 

  1. Select dimension Country and the value 'Spain'
  2. Change the dimension to City
  3. The result is City='Spain' and the component of the analysis put "Event table is empty"

 

How could solve it?

 

Thank you.

Pedro.


Reply