You can translate the question and the replies:

How to create base view on Bex query having range as a selection

Hello Team, We have a scenario where we are consuming Bex query having range selection to design base view. Let say we want to have data from 03.2019 till 03.2020. In that case we have to add 12 times the same field and give diferent months. Even if we use IN operator, we have to type manually 12 enties. How to give To and FROM value in this case. like FROM 03.2019 To 03.2020. Regards, Vijay
user
18-03-2020 08:01:01 -0400

3 Answers

Hi, For filtering data based on a range when consuming query generated using BeX query designer, I would perform the following : In the Virtual DataPort Administration Tool, I would create the base view using **"[Create from MDX query](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/multidimensional_database_sources/multidimensional_database_sources#creating-a-base-view-over-a-multidimensional-data-source-with-an-mdx-query)"** functionality and then I would include the [**interpolation variables**](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/advanced_characteristics/execution_context_of_a_query_and_interpolation_strings/execution_context_of_a_query_and_interpolation_strings#execution-context-of-a-query-and-interpolation-strings) in order to pass the values of the interval dynamically. In your scenario, you could add **two** interpolation variables such as **@START_DATE** and **@END_DATE** like: > SELECT NON EMPTY .... FROM [...] SAP VARIABLES [...] INCLUDING [0CALMONTH].[@START_DATE]:[0CALMONTH].[@END_DATE] You can have a look at [Multidimensional Database Sources](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/multidimensional_database_sources/multidimensional_database_sources#multidimensional-database-sources) section of Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
19-03-2020 06:46:01 -0400
Hello Team, I tried this approach and end up with below error when creating base view: MDX query: SELECT NON EMPTY [0CALMONTH].[LEVEL01].MEMBERS ON ROWS, \{[Measures].[00O2TPIJUPMKRTX8SC7P7WY9P], [Measures].[00O2TPIJUPMKRTX8SC7P7X4L9], [Measures].[00O2TPIJUPMKRTX8SC7P7XAWT]\} ON COLUMNS FROM [ZSPDSTG1/PCALMONTH_TEST] SAP VARIABLES [!V000001] INCLUDING [0CALMONTH].[@START_DATE]:[0CALMONTH].[@END_DATE] Error executing sentence: com.denodo.util.exceptions.InternalErrorException: unexpected error performing operation: Error executing BAPI: attribute value is not a number;BwPopSearch pop7(LDD::SAPMIW:_SYS_SPLIT_/BIC/FZSPDSTG1~4en)/[R Info: Object Name = "SAPMIW"."0BW:BIA:ZSPDSTG1", ... Any idea what could be the error now. Regards, Vijay
user
19-03-2020 07:11:11 -0400
Hi, This error usually happens in [SAP](https://answers.sap.com/questions/242593/error-attribute-value-is-not-a-number-sap-hana-vie.html) when there is a mismatch between a view column datatype and one of its actual values. Hence, in case of **Error executing BAPI: attribute value is not a number**, I would check if all my values are compatible with the defined column datatype. Also, if you are a valid support user and need further assistance for this scenario, you can open a Support case and our Support Team will help you further. Hope this helps!
Denodo Team
26-03-2020 01:54:10 -0400
You must sign in to add an answer. If you do not have an account, you can register here