Adding WHERE condition in "Calculations" tab of SSAS Cube Designer

HI,
I am using SSAS 2012 version to develop SSAS cube
and need help on following scenario :
In the BIDS designer, on the Calculations tab: 
I am creating one calculated member called [% Jobs] for which I am writing MDX expression as below :
'([Measures].[On Time jobs]/[Measures].[Total Jobs])*100'
Till here all is well... 
Now, How do I implement here WHERE condition ? 
For ex., in my fact table I have a column Line_Number
I want to implement above MDX expression such that it only considers Line_Number=1
while doing the above calculation.
Hope it is clear. 
Thanks...

I tried with below method :
While keeping the expression as it is :
'([Measures].[On Time jobs]/[Measures].[Total Jobs])*100'
What I did was in the partition tab, i choose option "Query binding" (instead of Table binding) and over there I mentioned the condition 
WHERE Line_Number=1
So it should do the calculations only for the first line.
Is this approach also correct ?
Thanks 

Similar Messages

  • Sorting measures (calculated members) in SSAS cube designer

    Hi,
    In SSAS 2012 cube designer, on the "Calculations" tab I am writing some simple calculated members and displaying it in a folder (Display Folder=)
    FolderA
    am So this FolderA has the members as below :
    [<-A1], [-A1], [A],
    [A1], [A2], [A3], [A4], [A5],
    and [>A5] 
    While I am browsing the cube from Excel 2007, this FolderA is deployed correctly along with the above measures. All fine till here.
    However, while I expand FolderA, Sorting is not done correctly. It is displaying like below :
    <-A1, >A5, A, A1, -A1, A2, A3, A4, A5
    But I want it to be sorted correctly so that it looks good as below :
    <-A1, -A1, A, A1, A2, A3, A4, A5, >A5
    How to do this at cube level ? Any property or any work around (using the latest SSAS 2012 version)
    Thanks

     
    Hi Yvanlathem,
    I am not talking about sorting of folders/subfolders.
    I want to short calculated members within the folder
    As my first post itself says, For ex., 
    in FolderA
    this FolderA has the members as below :
    [<-A1], [-A1], [A], [A1], [A2], [A3], [A4], [A5], and [>A5] 
    However, while I browse cube and expand FolderA ;  Sorting is not done correctly. Currently it is displaying like below :
    <-A1, >A5, A, A1, -A1, A2,
    A3, A4, A5
    But I want it to be sorted correctly as below (After
    use of this solve order keyword it should sort as per below):
    <-A1, -A1, A,
    A1, A2, A3, A4, A5, >A5

  • Difference between  aggregation and calculation tab in BEx Query Designer

    HI,
    I am using BEx Query Designer for my report, for the key figures in the coloumn area i slected one numeric key figures, in  the properties tab i found aggregation tab and calculation tab.
    I need to sum up the total values for that particualar coloumn, when i used calculation tab i found to sum all the values for a particular coloumn, then what is the use the aggreagation tab?
    I not able to used that Aggregation tab it is showing as a hidden fields...
    can any one tell me whats the exact difference between these tabs and when we need to use which tab?
    With Regards,
    Thanesh Kumar.

    Hi Thanesh Kumar,
    I moved this thread from forum Data Warehousing to Business Explorer since it is a query related question (as SDN moderator).
    I could explain to you the difference between these two tabs.
    For "calculation" tab, it changes the display of result and does not change the calculation logic.
    It means that, if this key figure is used further in formula, still the original number (without "calculation" tab setting)  is used for further formula calculation.
    For "aggregation" tab, it changes the real calculation logic.
    The system takes the setting as the aggregation rule for records.
    The most common aggregation rule is of course summation. If you set to e.g. Average here, the system does the
    Average instead of summation when aggregating records. And the Average value will be taken for calculation
    in further formulas or other calculations.
    For "aggregation" tab, you could only use it for CKF (calculated key figure) or formula and you could not use it for
    a basic key figure. That should be the reason why you see it greyed-out.
    Regards,
    Patricia

  • 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

  • SSAS Cube Connection with SAP BO IDT

    Hi Guyz,
    I have one requirement where i have to connect the SSAS cube with SAP BO along with cube security.I was able to connect the SSAS cube with the help of IDT using cube's Dll file , but i couldnot able to implement cube security in my SAP BO environment. The security incides the specific roles which are there in cube. My connection is not implementing the security which is there in cube.
    Kindly , provide any insights if anyone have on these.
    Thanks in Advance.
    Shweta

    Dear, Roberto,
    Our user has Full Access to all BPC tasks and it is administrator in BI system.
    Also we can successfully connect with the same user using Connection type "Local".
    We had done some investigation and in the BPC SQL Server trace log we can catch the following message when an error occurs:
    ==============[System Error Tracing]==============
    [System  Name] : BPCXMLAService [Message Type] : ErrorMessage [Job Name]    : ValidateUser [DateTime]    : 04/23/2014 10:58:06 [UserId]      : [Exception]    DetailMsg  : {System.Exception: Invalid user    at SAP.BPC.Services.Webservice.XMLAService.XMLAService.ValidateUser()} ==============[System Error Tracing  End ]==============
    It is very interesting that after the EPM workbook is launched via BI Launch Pad till an error occurs we are NOT provided with possibility to enter any username and password. So the EPM add-in should use the same user which was logged into BI Launch Pad - in our case the user with administrative rights both in BI Launch Pad and BPC systems. Am I missing anything?
    Looking forward your feedback.
    Thank you in advance.
    Best regards,
    Donatas

  • Where is the agree tab for the terms and conditions so I can proceed to purchase musuc

    Where is the agree tab for the terms and conditions so I can proceed to purchase musuc

    Sorry Randers, had to keep trying, couldn't accept the image wouldn't upload.

  • Concatenation error - when i use text column value in where condition.

    Hi,
    i am creating Materialized view using few columns from two tables and as per requirement i need to prepare select statement with where condition in another column.(new column)
    i tried like below....
    create materialized view MAIN
    refresh force on demand
    as
    select
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '|| b.trial_name||';' "QUERY"
    from
    exp_csv_tB a,
    exp_csv_tr b;
    a.table name value is : monitoring_table
    a.column_name value is : study
    b.trial_name = fty777
    Materialized view created with extra column but it is not added '' (codes) to text value in where condition.
    output which i got is :
    select * from monitoring_table where study = fty777;
    but
    i need output like
    select * from monitoring_table where study = 'fty777';
    fty777 value should be in codes like 'fty777'. i read some articles but didnt get this example.
    please help.

    Try this:
    CREATE MATERIALIZED VIEW main
    REFRESH FORCE ON DEMAND
    AS
    SELECT
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '''|| b.trial_name||'';'' "QUERY"
    FROM
    exp_csv_tb a,
    exp_csv_tr b;
    You have to give double single codes for semi-colons ..
    Regards..

  • SSRS with calculated dimension members SSAS

    Hello everybody,
    I have an interesting scenario involving a SSRS report with a matrix connected to a SSAS cube containing calculated dimension members.
    One of the parameters is "Reference Week".  Based on that parameter, I need the measures for the previous 5 weeks.
    So I created an anchor dimension "Analysis Weeks" with the members "Week -1" to "Week -5".
    Everything is working fine.  The only problem is the names of the columns on the report.  
    Currently I have "Current Week", "Week -1", etc. as column names, I'd like to show the real dates.
    For example, if I choose "2014-02-15" as the reference week, I want the first column to show "2014-02-15" instead of "Current Week". The second would show "2014-02-08" instead of "Week -1", etc.
    I tried to get the current column position in the matrix, which I could use the with @ReferenceWeek parameter, but I can't access that property.
    Any suggestion?
    Thanks

    If I understand correctly, your column group is on "Analysis Weeks", is that right? If so just get the value of that field and use it to get the dates.
    =DateAdd("d",-1*CInt(Right(Fields!AnalysisWeeks.Value,1))*7,Fields!ReferenceWeek.Value)
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • WHERE condition in OBIEE 11g

    HI gurus,
                    How can I use a WHERE condition in obiee 11g in the Column formula or in the BMM layer in the repository .
    Thanks in advance
    Reg,
    Niv

    Hi,
    In the Column formula, the functions like Case When clause (Category: Expressions) can always be used in the building the expression.
    For the above, there is always two options
    1. Derived from Physical Mappings - this will list only the physical tables that are pulled into the LTS of the logical table
    2. Derived from existing columns using an expression - this will list all the Logical tables in the RPD
    If you want to apply the filter i.e where clause on the entire table, then go to Content Tab of the LTS
    Enter your WHERE clause filters in the section - Use this "WHERE clause".....
    The above modifications will apply where clause on all the columns
    Please mark if it is helpful
    Srikanth

  • Sales Order creation of adding new condition type to Item

    Hi Expert,
    The sales order has been created and need to add new condition type (Z601) to the first item(10). While adding the condition I am getting warning message like
    "Item 000030 exists already; the entry will be ignored".
    Where item 030 will be the last item.
    I have cheked but it's a standard report SAPFV45P, we can't modify. Please let me know can we set any field in the sales order so that we wont be getting this message.
    Regards,
    Mahesh

    Hello,
             If you would like to add the Condition Type automatically for a specific Item based on some condition (Lets say, Item Category), then you can code a Pricing Routine in VOFM Transaction and it will be automatically assigned.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Field symbols as Table name and in where condition in a select statement

    Hello All,
    I have a scenario where I need to get user input on table name and old field value and new field value. Then based on user input, I need to select the record from the database. The column name for all the tables in question is different in the database, however there data type is the same and have same values.
    I am not able to use a field symbol for comparing the old field value to fetch the relevant record in my where clause.
    I cannnot loop through the entire table as it has 10 millilon records, please advice on how to add the where clause as field symbol as the table name is also dynamically assigned.
    Here is my code:
    DATA: TAB       LIKE SY-TNAME,
          TAB_COMP1 LIKE X031L-FIELDNAME,
          TAB_COMP2 LIKE X031L-FIELDNAME,
          NO_OF_FLD TYPE N.
    DATA: BEGIN OF BUFFER,
            ALIGNMENT TYPE F,
            C(8000)   TYPE C,
          END OF BUFFER.
    FIELD-SYMBOLS: <WA>   TYPE ANY,
                  <COMP1> TYPE ANY,
                  <COMP2> TYPE ANY.
    GET TABLE NAME GIVEN BY USER IN LOCAL VARIABLE
      TAB = TAB_NAME.
    CREATE FIELD NAME BASED ON THE TABLE NAME ENTERED.
      CASE TAB_NAME.
      WHEN 'OIUH_RV_GL'.
          KEY FIELD
            TAB_COMP1  = 'GL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OPSL'.
          KEY FIELD
            TAB_COMP1  = 'OPSL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'OTAX_GL_SYS_NO'.
            TAB_COMP2  = 'OTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN 'OIUH_RV_GTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'GTAX_GL_SYS_NO'.
            TAB_COMP2  = 'GTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN OTHERS.
            EXIT.
      ENDCASE.
    SET FIELD SYMBOL WITH APPROPRIATE TYPE TO BUFFER AREA.
    ASSIGN BUFFER TO <WA> CASTING TYPE (TAB).
    How to add where clause and remove the if condition in the select -- endselect
    SELECT * FROM (TAB) INTO <WA>. 
      ASSIGN COMPONENT TAB_COMP1 OF STRUCTURE <WA> TO <COMP1>.
      IF NO_OF_FLD = 2.
        ASSIGN COMPONENT TAB_COMP2 OF STRUCTURE <WA> TO <COMP2>.
      ENDIF.
      IF <COMP1> = OLD_SYS_NO.
        code for updating table would come here
          WRITE: 'MATCH FOUND'.
          EXIT.
      ENDIF.
    ENDSELECT.
    Please advice. Thanks much.
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:33 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:34 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:35 PM

    1. Create single column table for holding field name depending on the table entered.
    2. Take input from user: for e.g. table_name
    3. Using case load single column table with required fields
       for e.g.
      CASE TAB_NAME.
       WHEN 'OIUH_RV_GL'.
             Append 'GL_GL_SYS_NO' to KEY_FIELD --> KEY_FIELD is the single line internal table as mentioned in step 1.
       WHEN 'OIUH_RV_OPSL'.
             Append 'OPSL_GL_SYS_NO'.
       WHEN 'OIUH_RV_OTAX'.
             Append 'OTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN 'OIUH_RV_GTAX'.
             Append 'GTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN OTHERS.
          EXIT.
       ENDCASE.
       Now depending on the table name you have required column ready
    4. Create dynamic internal table using following sudo code
       Fill the fieldcatlog using the single column field table and DD03L table, See what all columns from DD03L you want to fill in field catlog table
       loop at internal table with all the fields.
        move it to field catalog.
        append field catalog.
       endloop.
    5. Pass this field catalog table to static method create_dynamic_table method
       DATA table TYPE REF TO DATA. --> data object for holding handle to dynamic internal table.
       call method cl_alv_table_create=>create_dynamic_table
       exporting
          it_fieldcatalog = fieldcatalog_tab
       importing
          ep_table = table.
    6. Now assign table reference to field symbol of type table.
       ASSIGN table->* to <field-tab>.
    7. Also create work area <field-wa> using refrence of table.
       create data object wa LIKE LINE OF <field-tab>.
       ASSIGN wa->* to <field-wa>.
    8. Also define field symbol for field name.
       for e.g. <field_name>
    4. Dynamic internal table is ready
    5. Now execute the select statement as follows:
       SELECT (KEY_FIELD)
         INTO <ITAB> --> created dynamically above
          FROM (TABLE_NAME)
         WHERE (WHERE).  --> WHERE is single line internal table having line type of CHAR72. So for every old value there will be one line
         Where condition is same as like we give in static way only difference in this case it will stored in internal table line wise.
        In this case you need to append all your where condition line by line in to WHERE.     
    5. To fill this dynamic internal table using ASSIGN COMPONENT <Comp_number> OF STRUCTURE <field-wa> TO <field-name>
       So in this case if first field of structure STRUCT1 is user_id then sudo-code will be
       loop at internal table containing list of fields into field_wa --> single column field table
           ASSIGN COMPONENT field_wa OF STRUCTURE <field-wa> TO <field>. "Here field_wa is wa area for single column internal table holding all the fieldnames.
           Now <field-name> points to user_id field. Move some value into it as nornally we do with variables.
           Move <your_new_value> to <field-name>. --> Assign new value
            or
            <field-name> = <your_new_value>.
       Endloop.
    6. After completing all the fields one row will be ready in <field_wa>.
       APPEND <field_wa> to <field_tab>.
    Hope this helps you.
    Thanks,
    Augustin.

  • Where condition for a column in BMM

    Hi Gurus,
    I have a requirement where in the BMM(The LTS for this logical table is say 'Fact'), I need a logical column with the following definition.
    count(Dim.status) where Dim.status = ' Accepted' (I didnt add the Dim table to the LTS yet, should I?)
    I know that we can do a count(Dim.status) in the column source . but for the where Dim.status = ' Accepted' part im not sure what to do.
    Should I bring the Dim table as a LTS and define the 'where' condition in the content tab? will that work?
    but what if I have another logical column where I need dim.Status = 'Declined'( we have many more status)
    Plz help

    The suggest statement as Filter(count(Fact.Dollars) Using("dim.status = 'accepted'))
    is based on Answers, this would care about the column is available in Subject Area or not thats it.
    The same kind of functionality can get the using rpd.
    There you might need to map/add (fact source properties and then map using pencil icon on 11g add button in 10g) the dim table to the fact
    so that you can get the expression based on physical columns as
    case when dim.status = 'accepted' then Fact.Dollars else 0 end
    use Aggregate tab for sum;
    Since you are using Fact.Dollars it suppose to be sum, ROW_WIDs go by counts
    Hope this helps :) for more Qs send email
    If helps mark

  • Apply "WHERE CONDITION" in "MASTER/DETAIL FORM" in "ORACLE APEX

    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan

    uzairmalik wrote:
    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan
    Probably a syntax error.  Check the syntax of the new clause very carefully.
    Can you post the query indicating which predicate is the new one?  If you need to change the column and table names for confidentiality

  • Adding pricing condition type  while complaint creation

    Hi,
    I want to add condition type , whille calim creation. I have written the Zpgm using crm_ordwer_maintian , we can do that.
    But the problem is I need to put in some BADI, i tried order_Save and pricing_I badi.
    But it gives dump 'maintian'  bapi in the order_Save. I treid with 'multi_ow'  but its not adding the condition type.
    Please help me , where I need to put this code ?
    Thanks,
    Sushant

    heyy, its working fine , some parameter missing.

  • Smartforms-table-calculations tab usage............

    Hi sap gurus,
    i am designing a  smartforms in which i have created a table of data. this contains line items.
    one of the field is amount.
    a) how to sum up all the amount of each line item so as to display at the footer.
    please tell me how to use
    calculations tab in table --> to calculate the sum...
    please tell me if u r not clear about my question......
    Thanks
    krishna
    Edited by: krishna chaitanya on Mar 10, 2008 11:15 AM

    Hi,
      In smartform 
    Click on global definition>  declare one variable to collect the SUM amount.Ther in    INITIALIZATION->import parameter pass your ammount field.
    And wite code there 
    v_amount = v_amount + 1.   
    In main window  pass this amount field where you want to display

Maybe you are looking for

  • SQL SERVER 2012 Installed to SMB share Error 59 (An unexpected network error occurred)

    I have installed SQL 2012 on a clustered file share. When I try to add space to extend the log file for a database I get the following error Msg 5149, Level 16, State 3, Line 1 MODIFY FILE encountered operating system error 59(An unexpected network e

  • How can i deploy a web application from JDeveloper 10.1.3 to tomcat 5.5.x ?

    hello i need easy way to deploy my jsf applications to tomcat . i create an application server configuration in my JDeveloper now what ? how can i say to deploy the app to tomcat not to oracle application server. another question : the "deploy operat

  • Problem of nested windows in SRM EBP 5.0

    Hi All, We are working on SRM EBP 5.0 where user can create a shopping cart and submit it . Below mentioned is the scenario which creates the issue.. 1)User is at step 1 ie Select Goods/Services . Thers one roadmap on top of the screen . 2)User selec

  • Need a simple html theme

    Hello everybody, i need a simple just html, no script or flash theme, for doing my photo albums. I have some veryyyy important people (gf and brother :)) than can't see those beacouse they do it on the corporate laptop and all the "bad stuff" are dis

  • My bb curve 8520

    I updated my app world yesterday and since it has rebooted my phone won't work it is stuck on the screen i can't use my trackpad or go to the menu but I have tried taking the battery out and it's still the same and it's been on charge all day but I o