cancel
Showing results for 
Search instead for 
Did you mean: 

Currency Conversion in Webi

Former Member
0 Kudos

Dear All .

     i've a problem in my webi report , the problem is that i'm getting my detailed table from olap connection that was belt on bex query ,

     the customer required to get the Amount in local currency only based on the latest rate for the selection month , i.e if i run the report and choose

     selection date 23/07/2014 , the exchange rate should be the end rate of july and so on .

     what i did is i created a generic datasource on the table  TCURR and created a cube on that datasource , then i crated a bex query on that cube

     and using webi formulas i calculated the exchange rate for the closing rate of the selected month

     but my problem is that when i was trying to multiply amount with that rate , i always get an error on the webi table . even if i merged the two queries      with the currency dimension

     can anyone help me on how to use the calculated rate or if there's any other way to achieve this .

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Thank you all for your response

i've solved the issue by creating a currency conversion type on the BW server , with a fixed time reference (Time Reference from variable ) , i selected the (0P_CSDAT) which is the selection date i used on my query

Regards

Answers (3)

Answers (3)

yuvarajponnusamy
Explorer
0 Kudos

Try to use the calculation context  'IN' in Web i to calculate the new rate.Also check the level of data in both the queries.

Regards,

Yuvaraj

Former Member
0 Kudos

Can you explain more , how to achieve  this as there's no relation between the two queries , the query that i used to get the rate only contains the currency from and to and the rate ?

Former Member
0 Kudos

HI Ayman,

      You have mentioned that, based on the month selection the currency rate should displayed, right? You can join the queries using that date column. Get the month from that date column and same as get the month from other query and join them. You can able to get the currency rate.

Former Member
0 Kudos

Hi Passion ,

     unfortunately this couldn't be applied as i'm not selecting only specific date i'm selecting all dates before the selection date , and the selection date shouldn't have an equivalence in the query that get the rates .

e.g i can select 31/08/2014 ,  the rate here should be the latest rate exists for Augusts regardless 31 rate exists or not

hope you get my point .

Regards

Former Member
0 Kudos

Hi Ayman,

    As i said earlier, don't look for date. Get the month name from the selection date.

For example, if you select 31/08/2014, if the get the month from the selection date, then it is 08/August. So you can get the rate with respect to August month.

yuvarajponnusamy
Explorer
0 Kudos

Hi Maher,

Please find below the text from SAP Support Notes, you should be able to solve the problem based on following. (1606502  - BI 4.0: #UNAVAILABLE in Web Intelligence report using BEx query):
Symptom
  • You create a Web Intelligence report based on a BEx query (using the BICS connector) and during the design process, #UNAVAILABLE is displayed for all measures (key figures).
  • You try refreshing the report, to no avail.
  • You try using contexts for the measures, to no avail.

Environment  SAP BusinessObjects BI Platform 4.0 SP0.x    Reproducing the Issue 1. In Information Design Tool, under Repository Resources, create a BICS OLAP connection to a BEx query.
2. Launch Web Intelligence from BI Launchpad and create a new document based on that BEx query.
3. In the query panel, drag and drop some dimensions and measures. Run the query.
4. In the Design view, create a new variable and add it to the report block or define and add a filter, etc.
5. All measures (key figures) display #UNAVAILABLE.
6. Refresh the query, but #UNAVAILABLE is still displayed for all measures.
   Cause This behaviour is by design.#UNAVAILABLE appears when it is not possible to calculate the value of a smart measure because it is managed by the back-end - database-delegated. As per the Web Intelligence 4.0 documentation Using functions, formulas, and calculations in Web Intelligence, which is available through the BusinessObjects Support portal on Service Market Place (SMP):“Smart measures” are measures whose values are calculated by the database (relational or OLAP) on which a universe is based. They differ from classic measures, which are calculated from the detailed values returned by the database. The data returned by smart measures is aggregated in ways not supported natively by the Web Intelligence component of the SAP BusinessObjects Business Intelligence platform."
The caveats to using smart measures that will cause the #UNAVAILABLE error acan be summarised as follows:

  1. Using a formula that may induce aggregation.
  1. Filtering on a dimension which is not in the dimension context of the smart measure (i.e. not in block).
  2. Applying a filter on a smart measure AND on a dimension in the dimensional context of the smart measure.
  3. Aggregating (or delegating) filtered data.
  4. Using the OR operator in nested filters.

Below are some illustrations drawn from the product guide. 1. Smart measures and dimensions containing formulas If a formula or variable appears as a dimension in the calculation context of a smart measure, and the formula determines the grouping set required by the measure, the values of the smart measure cannot be displayed.

For example, a report contains a variable, Semester, with the formula If [Quarter] = "Q1" or [Quarter] = "Q2" Then "H1" Else "H2" Placed in a block, the Semester variable returns the following result:
SemesterRevenue
H1#UNAVAILABLE
H2#UNAVAILABLE

2. Smart measures and filters on dimensionsIf you apply a multi-valued filter to a dimension on which the value of a smart value depends, but the dimension does not appear explicitly in the calculation context of the measure, the smart measure cannot return a value and the cell displays #UNAVAILABLE.#UNAVAILABLE appears because the measure must be filtered in the report and then aggregated, but a smart measure cannot be aggregated after a report-level filter is applied. Calculating the measure would be possible by adding a query filter to the generated SQL, but this solution carries the risk of impacting other reports based on the same query.Note:

  • A multi-valued filter filters on multiple values using operators such as Greater Than, In List or Less Than. You can apply single-valued filters such as Equal To without generating the #UNAVAILABLE error.
  • There is a workaround for cases which do not require aggregation: Define the formula as variable whose qualification is a measure and be sure that the used dimension is included in the block with the variable (you can hide that column for a better display).

Example: A smart measure and a filter on a dimension

A query contains the Country and Resort dimensions and the Revenue smart measure. Country and Revenue are displayed in a block. If you apply a report filter restricting the values of Resort to "French Riviera" or "Bahamas Beach", #UNAVAILABLE appears in the Revenue cells.

CountryRevenue
France#UNAVAILABLE
US#UNAVAILABLE
Sum:#UNAVAILABLE

If you restrict Resort to "Bahamas Beach" only, the values are displayed.

CountryRevenue
US971,444
Sum:971,444

3. Filters on smart measuresIf you apply a filter to a smart measure in a context where the smart measure is aggregated at different levels of detail, the smart measure returns the #UNAVAILABLE error when it is aggregated at a less detailed level.

Example: Filering a smart measure

You have a block displaying revenue by country and resort, where Revenue is a smart measure.

CountryResortRevenue
FranceFrench Riviera835,420
USBahamas Beach971,444
USHawaiian Club1,479,660
Sum:3,286,524

#UNAVAILABLE appears because the revenue in the block is aggregated by the grouping set (Country, Resort), but the total revenue in the footer, which is also impacted by the filter, is aggregated at a less detailed level than (Country, Resort).4. Smart measures and nested OR filters

Nested OR filters in which at least one of the filtered dimensions does not appear in a block generate the #UNAVAILBLE error for a smart measure in the block.

Example:

  • The filter [Country] = "US" OR [Country] = "France" returns #UNAVAILABLE for a smart measure that uses the [Country] dimension if [Country] does not appear in the block.
  • The filter [Country] = "US" OR [Year] = 2008 returns #UNAVAILABLE for a smart measure that uses the [Country] or [Year] dimensions if either [Country] or [Year] does not appear in the block.
Resolution

See individual entries for possible workarounds.
Please note: some of the workarounds suggested might not work depending on the complexity of the data manipulation within the Web Intelligence report.
Former Member
0 Kudos

Thank you Ponnusamy for your answer ,

     but i think my problem is a little different as i get the exchange rate from a different query that i used to get the main block and the error i got is #context error not the #unavailable which means that

the context for the measure which is the multiplication of the value by the rate is different because of they are not related to the same datasource .

Former Member
0 Kudos

Maher,

Can you please verify that value and rate has the same type? If not, this might be the cause of the error you are obtaining.

Regards,

Ashvin

Former Member
0 Kudos

both are numbers , the Amount is a number with a currency and the rate is measure i crated in the webi to calculate the closing rate for the selected month .

Former Member
0 Kudos

Hi Maher,

Can you please share the error message that you are getting?

Regards,

Ashvin

Former Member
0 Kudos

it gives me

#CONTEXT

error