Creating a TEXT calculated measure

Is it possible to create a calculated measure of data type TEXT using AWM ?
I want to do the equivalent of defining an OLAP DML formula which returns a text value, but I want to be able to store the formula in the OLAP metadata.
I'm familiar with creating "dummy" calculated measures in AWM, saving to an XML template file, then editting the XML and reimporting, to define more complex calculated measures than the AWM wizard provides for, but I still haven't been able to successfully create a calculated measure which returns TEXT.
I've tried changing the XML from DataType="Decimal" to DataType="Text", but there are other sections in the XML such as:
CalcStep StepClass='oracle.dss.selection.calcStep.SimpleMathCalcStep
and:
CalcValue DataType='java.lang.Double'
which I think are also having an impact.
Any examples would be much appreciated.
Thanks,
Andy White

I have succesfully created text-valued measures with the AWM graphical interface. You need to make sure when you define the data cube that it does not have the "compressed" option checked, then you will get TEXT as one of the choices of data when you create a measure.

Similar Messages

  • How to create a simple calculated measure ?

    Hello,
    I'm having difficulties creating a very simple calculated measure within OBIEE administrator. Let's say I have a dimension "product" with attribute "product price" and a measure "sales count". I'm trying to define in the "Business Model" layer the calculated measure "total sales". In order to do that I defined it as as a Logical Column with expression "product price" * "sales count".
    However OBIEE doesn't compute what I'm expecting, it does in fact a cartesian product of the products and the grand total sales, which doesn't make sense. To alleviate that I tried to define the measure as associated to the Product level, then I get the computations right but the sales by product are not summed into a grand total.
    Anyway this seems like a very basic thing to do but I've not been able to find any documentation about it; the internal "Help" documentation is extremely limited. Is there another source of documentation that I'm not aware of ?
    Thanks for your help,
    Chris

    Hi there again,
    I'm coming back to you regarding the calculated measure above. As advised, I defined it using physical columns and am - almost - able to get the correct results. However I notice that the measure is not correctly aggregated over the "product" dimension. More specifically what happens is that the products are organized into a level-based hierarchy; only the leaf elements have an attibute "price"; the upper nodes in the hierarchy group different products together with different prices.
    The "total price" measure for such a node should be the sum of "product price" * "sales count" for all underneath nodes in the hierarchy, which is the way it is done for instance in AWM. However with the measure defined as above, I only get NULL values for upper nodes, due to the fact that "product price" is NULL for those levels and thus yields a NULL result.
    I've tried to circumvent the problem by associating the measure to the leaf level of the "product" hierarchy in the Properties -> Levels tab, however this doesn't seem to do what I want, it only forces the computation to happen at the lowest level of the hierarchy. What I would like is for the measure to aggregate to upper levels just as it would were it defined directly in AWM.
    Do you know how to do that ?
    Thanks for your help!
    Chris

  • [Forum FAQ] How do I create calculated measure using AMO in SQL Server Analysis Services?

    Introduction
    In SQL Server Analysis Services (SSAS), you can create a calculated measure in SQL Server Data Tool (SSDT)/Boniness Integrated Development Studio (BIDS). Sometimes you may need to create calculated measure by using AMO in a C# or VB project.
    In this article, I will demonstrate so how to create calculated measure using AMO in SSAS?
    Prerequisites
    Before create calculated measure using AMO, you need to ensure that the following components were installed in your server.
    The multidimensional database AdventureWorks Multidimensional Model 2012
    A SQL Server with SSIS and SSAS installed
    The AMO libraries installed:
    X86 Package (SQL_AS_AMO.msi)
    X64 Package (SQL_AS_AMO.msi)
    Solution
    Here is the detail steps to create calculated measure using AMO in SSAS.
    Open SSDT and create a new SSIS project.
    Drag Script Task to the design surface.
    Click SSIS-> Variables to open the Variables window and add two variables that used to connect to the server and database.
    Create a connection to connect to SSAS server.
    Rename the connection name to ssas.
    Double click the Script Task to open Script Task Editor.
    Add Connection and Database variables to ReadWriteVariables textbox and then click Edit Script button.
    Add AMO reference in the Solution Explore window.
    Copy the script below and paste it into the script.
    Dim objServer As Server
    Dim objDatabase As Database
    Dim strDataBaseID As String
    Dim objCube As Cube
    Dim objMdxScript As MdxScript
    Dim objCommand As Command
    Dim strCommand As String
    objServer = New Server
    objServer.Connect("localhost")
    objDatabase = objServer.Databases("AdventureWorksDW2012Multidimensional-EE2")
    strDataBaseID = objDatabase.ID
    If objDatabase.Cubes.Count > 0 Then
    objCube = objDatabase.Cubes("Adventure Works")
    If objCube.MdxScripts.Count > 0 Then
    objMdxScript = objCube.MdxScripts("MdxScript")
    objMdxScript = objCube.MdxScripts(0)
    Else
    objCube.MdxScripts.Add("MdxScript", "MdxScript")
    objMdxScript = objCube.MdxScripts("MdxScript")
    End If
    objCommand = New Command
    strCommand = "CREATE MEMBER CURRENTCUBE.[Measures].[Multipy Measures By 3]"
    strCommand = strCommand & " AS [Measures].[Internet Sales Amount] * 3, "
    strCommand = strCommand & " VISIBLE = 1 ; "
    objCommand.Text = strCommand
    objMdxScript.Commands.Add(objCommand)
    objMdxScript.Update()
    objCube.Update()
    End If
    objServer.Disconnect()
    Then you can run this SSIS package to create the calculated measure.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • Can we create a analyses with measures  as rows for comparision trend

    I am working in OBIEE 11g.
    Need to create a analyses with measures as rows and study their yearly progress in a single table
    normally dimesions are used as rows and measures as columns but this one is slightly different ..tried using table and pivot but unable to show diff measures in single table
    Something like this:
    ------------------------------------Yearly ------Prev year------change%               
    Shipped Qty ---------------------150----------100--------------50%
    Delivered Qty---------------------150----------100--------------50%
    Undelivered Qty-----------------150----------100--------------50%
    Billed Qty---------------------------150----------100--------------50%
    where shipped Qty , Delivered Qty , Billed Qty are the various measures
    Please share your expertise in achieveing this
    Would appreciate your help as its urgent
    Regards
    Pranati

    Hi Pranati,
    Create a Union report. You have one calculated column with just the text, eg.; 'Shipped Qty' and 3 columns with the 'Shipped Qty'-measures; Yearly ------Prev year------change%
    Do the same for the other 3 Qty's
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • Nested IF/AND/OR in Calculated Measure/Column

    I have the following problem, which I couldn't quite solve in Excel and was wondering whether it can be done in PowerPivot (I failed so far):
    A datasheet with a column "HOUR" and another column "AM/PM". Entries in the first column consist of 1,2,3,4,5,6,7,8,9,10,11, or 12, the second column consists of 'AM's or 'PM's. Together they define the time of an incident (regarding the
    below problem, note that I am not allowed to create a new column in the source datasheet or change existing columns). The below formulas 1.) to 3.) work excellent in Excel for getting '1's or '0's for incidents that happened either between 8AM and 4PM, or
    outside of this time window, as long as I create a new column somewhere in the source datasheet.
    1.) =IF(AND(A1>=8, A1<=11),IF(B1="AM",1,0),0) + IF(AND(A1>=1, A1<=4),IF(B1="PM",1,0),0) + IF(AND(A1=12),IF(B1="PM",1,0),0)
    2.) =--OR(AND(A1>=8, B1="AM", A1<>12), AND(OR(A1<=4, A1=12), B1="PM"))
    3.) =--OR(AND(OR(A1={8,9,10,11}),B1="AM"), AND(OR(A1={1,2,3,4,12}), B1="PM"))
    However, I wanted the "1"s to be summarized - without creating an extra column - as calculated field in a pivot table in Excel. As it turned out, the calculated field option in Excel's standard Pivot table doesn't allow such complex formulas.
    Someone then told me to try PowerPivot. However, the calculated column/calculated measure option in the PowerPivot sheet (once I loaded my data) doesn't seem to support the above formulas either.
    The column headers have the same names as I described above. However, some symbols were not accepted so the relevant ones read now: "[HOUR]", "[AM PM]".
    I tried:
    =IF(AND([HOUR]>=8, [HOUR]<=11),IF([AM PM]="AM",1,0),0) + IF(AND([HOUR]>=1, [HOUR]<=4),IF([AM PM]="PM",1,0),0) + IF(AND([HOUR]=12),IF([AM PM]="PM",1,0),0)
    Error: "Too few arguments were passed to the AND function. The minimum argument count for the function is 2."
    =OR(AND([HOUR]>=8,[AM PM]="AM",[HOUR]<>12), AND(OR([HOUR]<=4,[HOUR]=12),[AM PM]="PM"))
    Error: "Too many arguments were passed to the AND function. The maximum argument count for the function is 2."
    Does anybody know how to translate any of the above formulas into one PowerPivot accepts? or, alternatively, any other way how to achieve the desired results? Thank you for any help on this.

    Hi Natrajx,
    The first of your formulas can be translated into the follow DAX syntax that can be used to define a Calculated Column:
    IF(
    table1[HOUR] >= 8 && table1[HOUR] <= 11,
    IF(
    [AM PM] = "AM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] >= 1 && table1[HOUR] <= 4,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] = 12,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    You could also created a Calculated Field based on similar logic using the following formula:
    SUMX(
    'Table1',IF(
    table1[HOUR] >= 8 && table1[HOUR] <= 11,
    IF(
    [AM PM] = "AM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] >= 1 && table1[HOUR] <= 4,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] = 12,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    Note the use of "&&" instead of the AND() function. In DAX, the AND() and OR() functions only support a maximum of 2 arguments. You can use "&&" for the AND operation and "||" for the OR operation. Hopefully
    the DAX examples above will help you to see how it can be applied to your scenario.
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • How can I create a Text-Input Field in BexAnalyzer for a Planning Function

    Hello,
    i want to create a pre calculation(contribution accounting) for Materials in BI-Integrated Planning. These Materials aren't in the master data. So I create a new Info Object for pre calculated materials with only a material-number as key and a text-description.
    Now I want to write a Exit-Function, which creates new materials in these Info Object. The user should start this function in a planning application in BexAnalyzer. There the user should have the possibility to enter a text-description for the new material. How can I create such a Text-Field in BexAnalyzer and how can I read this text filed in a planning function (exit).
    Thanks in advance

    Hi Jürgen,
    you can create a parameter for this in the exit function and a variable for the parameter. In BEx Analyzer then create a button for the planning function; in the button parameterization use VAR_NAME = , i.e. use an Excel formula here to get the value from an Excel input field.
    The command range should be some 'hidden area' in your Excel sheet.
    But may be you don't need this. Use a characteristic without master data. Then ensure that that the query uses the option 'key' as display. In new lines you can then enter the key, the system creates a SID on the fly (but the text table will not be updated). In this scenario you may take text also from the key. May be you can update the text table (online or in batch) by simply using function modules from function group RSNDI_MD (not released by SAP).
    But observere that the system in BI Planning reads only the active version, i.e. if you change something on the fly the changes may not be visible.
    Regards,
    Gregor

  • How to create a specific calculation

    Hi all
    I would like to create a calculation using the sales amount as measure and the geography as dimension
    The hierarchy of the geography is:
    ALL
    -Region
    --Country
    ---Store
    And the calculation I want is:
    Sales of a Country/ SUM(sales of its Region)
    using level based measures allows me to create
    Sales of store / SUM(sales of Country)
    Sales of store / SUM(sales of Region)
    Sales of store / SUM(sales of ALL)
    because the sales are aggregated at the lowest level wich is 'Store'
    Any one knows how I can create this in the repository?
    Regards

    Hi,
    I don't really see the problem, because the solution is quite easy:
    1. Create one level based measure: Sales by Country
    2. Create another level based measure: Sales by Region
    3. Create a logical column with the calculation Sales by Country / Sales by Region based on the logical columns from 1 and 2.
    Regards,
    Stijn

  • Using named set in calculated measure is not working

    Hi Techies,
    I need an urgent solution. Here is my problem,
    I have a product dimension which has some "n" no of products. I need to create a measure with few members from the product dimension. (e.g. Sales for laptop & mobile explicitly, out of other electronic gadgets)
    I have created a static named set for some n number of products and a calculated measure in which I have included this named set as below,
    CREATE SET CURRENTCUBE.[Compact]
     AS {[Dim Prod].[Gadget].&[Laptop],[Dim Prod].[Gadget].&[Mobile]} ;        
    CREATE MEMBER CURRENTCUBE.[Measures].[Compact Sales]
     AS ([Compact],[Measures].[Sales]), 
    VISIBLE = 1   ; 
    but when I browse the cube the above measure is returning Null value. When I change the named set to dynamic, the measure is showing value but no filters(laptop & mobile) seems to be applied for that measure unless I add that named set explicitly in
    the filter area.
    I need a solution where I don't want to use any filters but the measure should work as expected.
    Please help me with this, it is very urgent.
    Thanks in advance,
    Latheesh
    latheesh

    hi Latheesh ,
    I'm not sure why do you need to create a new measure .. There is a problem to aggregate a set in a calculated member . I will suggest a new member on your
    Gadget dimension :
    CREATE SET CURRENTCUBE.[Others_Set]
     AS {[Product].[Product Categories].[Category].&[4],[Product].[Product Categories].[Category].&[1]} ;        
    CREATE MEMBER CURRENTCUBE.[Product].[Category].[Others]
     AS Aggregate([Others_Set]), 
    VISIBLE = 1   ; 
    select [Product].[Category].AllMembers on 1
    , [Measures].[Internet Sales Amount] on 0
    From [Adventure Works]
    Regards, David .

  • Creating & Moving Text Fields Causes Delays/Slowness

    Maybe it's my computer, but I'm trying to create a simple PDF form using only text fields and it's very slow going. I'm adding the text fields to a 4MB PDF created in Illustrator that includes hi-res JPEG-compressed images. I need the file to be hi-res for end-user printing. The problem arrises right off the bat when I go to insert my first text field. I get the text field placed and then my curser goes to the watch, then the twirling beach ball. This lasts for about 30 seconds before I can even edit the formatting/properties. Once the program is done thinking, I go to create another text field. Sometimes this too requires 30 seconds of spinning beach ball and sometimes not. Either way, it's painfully slow as I have a couple dozen of these to add and tweak. I don't want to wait 30 seconds every time I try to tweak something. I'm running with 8 GB of RAM and while my Mac Pro is 4 years old, it has a 2 x 3 GHz Quad-Core. I'm running CS5 with Acrobat Pro.
    Is there a setting I could be using that could help speed things up? It just seems strange that the computer/program has to do so much thinking after each placed text box... especially since there are no formulas/calculations being used. Unfortunately, I don't usually use Acrobat or create forms, so I'm somewhat of a novice user despite being a 20-year Adobe user.
    And I suppose if the problem is the size of my original PDF created in Illustrator, can I create the form on top of a much lower res PDF and then transpose the form to the higher res version for distribution?
    Thanks everyone!
    Abby

    I suppose a possible solution is if there's a way to add the text form fields in Illustrator... or if there's a way to add an invisible marker (besides adding a rule line) that Acrobat will automatically read as a text field location?

  • Powerview modifying a calculated measure in SSAS cube

    We are running SQL Server 2012 and Sharepoint 2013 we are having problems with Powerview modifying a calculated measure in the underlying multidimensional cube. We have a powerview report with multiple pages that allows a user to utilize a global filter
    to view the financial performance of particular customers on multiple reports/pages. When the user picks a different customer, one of the calculated measures, in this case gross margin percent, is essentially stuck. It does not change when the customer selection
    changes. It remains the gross margin percent as the previous customer. All of the other measures change appropriately. Measures such as sales, expenses, ebitda and the other measures that are columns in the relational sql server db feeding the cube are fine.
    Only the calculated measures defined in ssas are not working. I then tested the molap cube on a clean connection to a new excel sheet and was shocked to find that the same value the power view report is stuck on is also displayed in the excel file!  It
    has essentially modified the data in the cube!  The only way to clear the value and display the correct calculation is to re deploy the cube. Any one here know what to do to resolve this?

    Hi Osu75,
    According to your description, you create a PowerView report using SSAS cube as the data source in SharePoint site, the problem is that when changing the selection in the global filter, it change the calculated measure in the underlying multidimensional
    cube, right?
    In your scenario, which script are you using when creating this calculated measure?  Generally, report is used to display data from underlying database, it's really strange that the PowerView report change the calculated measure in the underlying multidimensional
    cube.
    From a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with Microsoft. Visit this link to see the various support options that are available
    to better meet your needs:
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Howto create special level based measure

    Hi all
    I have a geography dimension :
    All
    -Region
    --coutry
    ---store
    I'm reporting the sales per year:
    I need to create a measure that able the user to display 'shareof sales' for every level in the hierarchy.
    In other words In need a logical column that allows the user to see :
    store sales /total of 'country sales '
    country sales /total of 'Region sales'
    Region sales/total of 'All sales'
    I created 3 level based measure with different levels for every one and calculate the 3 'shareof sales'.I had a correct result But the user wants to have only one logical column representing all the combinations and using different levels of the hierarchy as lowest level .
    Is it possible to create this kind of calculation?

    Thanks stijn
    Yes he wants "sales by store"/"total country sales" when a store is in the report and "sales by country"/"total region sales" when country is in the report, but he also wants to "sales by lowest level of detail" / "sales by lowest + 2 level of detail" when store is in the report and this using the same logical column.
    But how do you create a measure which is aggregated by the lowest +1 level of detail?
    No i didn't create this aggregation and I don't know if it's possible.so I don't realy have "sales by country"/"total region sales" when country is in the report.
    Do you know what I mean? So actually you want the BI Server to find out what the higher level in the hierarchy is. I'm not aware of a function which could do this.
    Actually as you said is their any way to make the server aware of this or every thing need to be decided in the repository before??
    Regards
    Edited by: aharrab_be on Jan 28, 2009 6:55 AM

  • MDX calculated measure causing performance issue

    The calculated measure below against all product members is causing the excel pivot table to hang indefinitely. Any help on how to optimize the query for better performance?
    SCOPE ([MEASURES].[DIDaysInMonth]);
    THIS = CASE WHEN [Measures].[MonthDifference] < 0 THEN 0
    WHEN [MEASURES].[MonthDifference] >= 0 AND ProjectedEnd > 0 THEN [MEASURES].[DaysRemainingInMonth]
    WHEN [MEASURES].[MonthDifference] = 0 AND ProjectedEnd < 0 THEN
    [Measures].[Ordered Cases] / (([Measures].[Forecasted Sales]-[Measures].[Cases])/[measures].[DaysRemainingInMonth])
    WHEN [MEASURES].[MonthDifference] >= 0 AND ([Time Monthly].[Time Monthly].CurrentMember.PrevMember,[MEASURES].[ProjectedEnd]) <= 0 THEN 0
    WHEN [MEASURES].[MonthDifference] > 0 AND ([Time Monthly].[Time Monthly].CurrentMember.PrevMember,[MEASURES].[ProjectedEnd]) > 0 THEN
    ([Time Monthly].[Time Monthly].CurrentMember.PrevMember,[MEASURES].[ProjectedEnd]) /
    ([Forecasted Sales] / [daysInMonth]) END;
    END SCOPE;
    BI Developer

    Hi Abioye,
    According to your description, you create a calculated measure which against all products  in your AS cube, now the performance is poor when using this calculated measure in EXCEL Pivot table, right? In this case, here are some links which describe
    tips about performance tuning in SSAS, plesae see:
    http://technet.microsoft.com/en-us/library/cc966527.aspx
    http://sqlmag.com/t-sql/top-9-analysis-services-tips
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Trying to create a text that is on fire or more like a hot branding iron

    Trying to create a text that is on fire or more like a hot branding iron

    Something like this?
    That was from a project I did a few months ago.  Sounds similar to what you want.  I did that in After Effects.
    Basically all I did was add a glow effect to the text and messed around with the glow parameters.  The black smoke is animated and moves on the actual video and is basically some pre keyed smoke footage that I had.  The smoke was originally gray but black looked cooler.
    I'd say it's pretty close to your hot branding iron thing.

  • How can I create a text pop up window in my Pages document? I want text to pop up when the reader hovers his/her cursor over a certain word.

    How can I create a text pop up window in my Pages document? I want text to pop up when the reader hovers his/her cursor over a certain word in the document. I am teacher. So for example when a student came to word he/she did not know, if he/she hovered the cursor over the word, a defintion or other information would appear.  You can do this in Word using bookmarks/hyperlinks but I can't figure this out in Pages. I can link it to another point in my Pages document but I just need the text to pop up - not take the reader to another location.  THANK YOU!!!!!!

    Have you tried Word for Mac?
    You will need to test if links survive export or printing to .pdf
    Peter

  • Creating a rate calculator [was: how do i create this?]

    I want to create a rate calculator on a website with 2 input fields: calling from and calling to.  Here is what i've got:
    CALLING FROM table:
    COUNTRY     $/MIN
    Africa            0.10
    Europe          0.20
    Asia              0.30
    CALLING TO table:
    COUNTRY     $/MIN
    Africa           0.20
    Europe         0.30
    Asia             0.50
    USA             0.10
    Basically to get the rate $/min the CALLING FROM selected country and the CALLING TO selected country will be added together i.e calling from africa to USA would be $0.20/min (0.10 + 0.10).
    - How do i create the database for this? (in access)
    - How do i then create the rate calculator in a webpage? (asp/php)???
    I would really appreciate anyone who will be able to help me in this.
    Thank you very much.
    Natalie
    [Subject line edited by moderator to indicate nature of question]

    Create a database table with 3 columns
    Country
    ToRate
    FromRate
    Populate these values as appropriate.
    Create two drop down menus on your page; FromRate and ToRate.  Populate these with the values (Display value and rate) from the table.
    Then, you could either:
    1) Submit the form to a server side script that adds and displays the values
    2) Use Javascript to add and display the values

Maybe you are looking for