Business Objects XI Web Intelligence how to reference a list of measures as variables in a prompt?

给你一囗甜甜゛ 提交于 2019-12-11 11:03:28

问题


The requirement is to present a user with a list of measure names in two prompts. The user selects a measure name from each prompt. Based on the user selection, the actual measures are mapped into blocks on the report. Some of the measures are counts and some are dollar amount sums so data type specific formatting applies.

The final report gives a side by side comparison of the two measures that the user selects.

Prompt #1 targets the left hand block

Prompt #2 targets the right hand block

Each list of measure names is 10 items long.

The idea is that this one report can be used as the template for a number of different side by side comparisons for two measures.

How to reference a list of measures as variables in a prompt?

How to map the user selections to the actual measures in the data provider?


回答1:


If I understand you correctly you want to give user a possibility to select between e.g. Revenue, Amount, Cost, Profitability, Average Price.

Each of this values represents a measure in the universe.

I would create in the universe an object

[promptMeasure]=
case @prompt('Select measure','A',{'Revenue', 'Amount', 'Cost', 
'Profitability', 'Average Price'}),mono, constrained,persistent) 
when 'Revenue' then [Revenue] 
when 'Amount' then [Amount] 
when 'Cost' then [Cost] 
when 'Profitability' then [Profitability] 
when 'Average Price' then [Average Price] end

Add this object to your query in the report. In the report you can also use function FormatNumber and apply conditional formatting dependent on the value of the prompt:

For example:

[FormattedMeasure]=if UserResponse("Select measure")='Profitability' 
then FormatNumber([promptMeasure];"#,##0.0%") 
else FormatNumber([promptMeasure];"#,##0.00")


来源:https://stackoverflow.com/questions/15889149/business-objects-xi-web-intelligence-how-to-reference-a-list-of-measures-as-vari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!