SSAS - Creating a Measure For Defects Per Unit

Hello, everyone
I'm attempting to create a Defect Per Unit calculation. I have an odd situation where my source data is recording all of instances of a given Defect (the single defect is recorded in multiple locations, DimLocation). So I'm receiving many rows that I need
to represent as a single defect.
How can I create a measure that will properly count each defect (DimDefect) only once-per-unit? Can I do this without creating a separate fact table and measure group that removes DimLocation? (The location is needed for some other measures but this one
won't use it. My goal is to simplify the cube structure for the user.)
I'm pretty new to MDX so if there is any other information I can provide, I would appreciate it.
Thank you!,
-Aaron B.

You can also do the same by using the concept of Semi-Additive Measures or the other turn around you can think of is (SUM of DefectMeasure) / (Count of Defects) ... The only problem with the second approach is you will get a Total of the same which sums
everything and deletes that with the count.. My possible suggestion would be go with Semi - Additive Measure (Last Non Empty / First Non Empty such)... I didn't do this same this MDX way, but I am sure that would be possible too.
Please mark as answer, if this has helped you solve the issue.
Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

Similar Messages

  • Create transfer order for moving storage units

    Hello guys,
    I need to create transfer order for moving storage units, the same with the transactions LT09, I found this FM 'L_TO_CREATE_MOVE_SU' but no work, somebody have an example for this FM, thanks a lot!

    Hello,
    I had the same problem today and I've fixed it by calling the FM in a different task (asychronous) .. this way the fugr/internal variables will be loaded again and you won't get this stupid error anymore. 
    CALL FUNCTION 'L_TO_CREATE_MOVE_SU' STARTING NEW TASK lv_task
    In case you need it syncronous use PERFORMING clause together with WAIT UNITL
    Hope this helps!
    Cristian

  • CONTRIBUTION MARGIN (PLAN) CALCULATION FOR PRODUCTS (PER UNIT, LOCATION WIS

    Requirement of a Report to calculate Contribution Margin (Plan) - For Calculating Contribution Margin.
    2 Key figures need to be arrived (per unit/cv of product, locationwise) are Net Sales Realisation (NSR) and Total Variable Cost (TVC).
    a) To arrive at NSR (Plan), all the combinations of upcoming discounts and Free Goods schemes which are going to be in force for the coming month for a product, need to be adjusted in the Net Sales Value to get NSR value per unit of Product (SKU / CV), locationwise
    The NSR is the result of adjusting Discounts, Excise and Schemes to the List price of a product.
    b) TVC is the result of adding Total Material Cost(TMC) + [(LabourPower) conversion cost]Freight.
    Calculation of material cost takes into account the LCC (Landed cost chart) price of the materials, which is a future price.
    The Total variable Manufacturing Cost (TMC+Conversion cost) can be calculated using Costing Run (CK40N), using LCC price.
    In COPA Reporting the values like List price, Discounts, Excise, Free Goods Schemes and freight flows from Billing Documents (SD) because of condition types mapping in to value fields in COPA, which are components for calculating NSR (Actual), based on the Actual sales.
    We want to understand how do the Plan values (List price, Discounts, Excise, Free Goods Schemes and freight) per unit of Product, location wise, flow to the Value fields in COPA Planning,  so that the Contribution Margin (Plan) can be calculated for each product per unit , location wise.
    Contribution Margin = NSR u2013 Total Variable Cost.

    Then you hit a bug in your version of Oracle. You may want to investigate and update to a newer version. I get the following error when trying to register your schema in 10.2.0.1
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00246: invalid QNAME "***_voting_flag"
    This error is consistent with Spy 2008 as well (I didn't try Xerces but I've got two that agree so it's good for me).

  • How to create a measure for COUNT and compare year-to-date/last year?

    Hello expert,
    I have gone through the Oracle by example tutorial for creating the repository. However, I can't find out how to create a measure to display the COUNT (sequence ID). I tried the Aggregation function on the sequence ID on the Fact table but the report on Answer listed out all the sequence IDs in the database. And did not give me the count of the transaction for the period quarter. If I used the sequence ID on Dim table, the SQL failed.
    And also I want to have two counts, one is for the count of transactions by quarter. Another is for count of transaction for the same period quarter.
    Please help.
    Thanks.....

    If you use count (or count distinct ) as the aggregation rule in the dropdown in the repository column, it should work. Or you can post the generated logical and physical sql here.

  • How to create count() measure for certain set of records in BMM Layer

    Hello all.
    I have a logical table like this one (Table AAA)
    Table AAA
    <p>
    --------------------------+<p>
    |       *Key*            |    *Name* |   <p>
    --------------------------+<p>
    |    1-2EMHS9     | AAA      |<p>
    --------------------------+<p>
    | 1-2EMWMO      | BBB      |<p>
    --------------------------+<p>
    |         NULL       |     CCC   |<p>
    --------------------------+<p>
    I need to calculate count() of records where <b>Key is not NULL</b>. In this example, this field must return coun() = 2.
    I suppose, CASE operator may help me with that, but I do not know for sure how to do this.
    Thank you for help,
    Alex.

    Thank you.
    But I must concretise my issue.
    I need to calculate number of records (e.g. order_id) that sutisfy appropriate condition (one of columns (e.g. loy_member_id) is set to null).
    I created logical column, that returns order_id if condition (loy_member_id is null) is met.
    Look at my logical column:
    Q Orders (LPM) - must return number of orders where loyalty_member_id is null.
    It has an expression:
    CASE  WHEN  NOT "Foxtrot (my) replica"."Sales Orders".LOY_MEMBER_ID IS NULL  THEN "Foxtrot (my) replica"."Sales Orders".ORDER_ID ELSE  NULL  END
    So, this returns order_id I need.
    But the question is how to count number of <b>order_id</b>'s returned by this column on BMM Layer.
    When I define my column with next expression:
    *<u>COUNT</u>(CASE WHEN NOT "Foxtrot (my) replica"."Sales Orders".LOY_MEMBER_ID IS NULL THEN "Foxtrot (my) replica"."Sales Orders".ORDER_ID ELSE NULL END)*
    I receive error:
    +[38083] The Attribute 'Q Orders LPM' defines a measure using an obsolete method.+
    Thank you,
    Alex.
    Edited by: Alex B on 3/3/2009 19:59

  • Problems when creating a  transfer order for moving storage units

    Hi,
    When creating a TO for moving storage units with FM FU L_TO_CREATE_MOVE_SU i got problems when the storage unit consist of 2 items. The message 'Warehouse number does not exist (new selection required)'
    is displayed. When i use the FM again after this message then the TO is created correctly.
    When i debug the FM for 2 items is see that LEIN-LGNUM is empy en when performing:
    PERFORM T300_LESEN(SAPML03T) USING LEIN-LGNUM. and the message E080 is raised.
    The perform before this is determining the lein-lgnum (PERFORM LENUM_EINL_CHECK(SAPML03T) USING I_LENUM) but this value isnt passed to the calling program the first time (memory or something????)
    Does anyone have a solution for this problem?
    Thx in advance.
    Kind regards,
    John Nijburg

    Hello,
    I had the same problem today and I've fixed it by calling the FM in a different task (asychronous) .. this way the fugr/internal variables will be loaded again and you won't get this stupid error anymore. 
    CALL FUNCTION 'L_TO_CREATE_MOVE_SU' STARTING NEW TASK lv_task
    In case you need it syncronous use PERFORMING clause together with WAIT UNITL
    Hope this helps!
    Cristian

  • How can I derive Measures for coming periods like (Next Qtr – Measure)

    Hi All,
    How can I derive time series measures for coming periods just like Qtr Ago and Year Ago I want Next Qtr and Next Year columns in my fact, how can I achieve this?
    I have a report which talks about Actual recorded values to the projected values of current quarter , Ago Quarter , Next Quarter
    Ago Qtr | Current Qtr | Next Qtr
    xxx | xxxx |xxxxx
    yyy | yyy |yyyy
    Ago(measure, level, no of periods)
    Thanks,
    SMA
    Edited by: SMA on Sep 21, 2010 4:23 PM

    Hi All
    I have derived Next to Next Qtr starting date using the following formula
    TIMESTAMPADD( SQL_TSI_QUARTER , 3, TIMESTAMPADD( SQL_TSI_QUARTER , -(1), TIMESTAMPADD( SQL_TSI_DAY , -( EXTRACT( DAY_OF_QUARTER FROM "Business Intelligence"."Dso Date Dim"."Date")) + 1, "Business Intelligence"."Dso Date Dim"."Date")))
    Extracted quarter from the derived date as well
    EXTRACT( QUARTER_OF_YEAR FROM "Business Intelligence"."Dso Date Dim"."Next Qtr Start Date")
    However I could not create a measure for next quarter using Ago or ToDate functions in BMM of OBIEE
    Please let me know if any one worked on this before
    Thanks,
    SMA

  • Mrp per unit filed in excise invoice not showing value

    Hi,
    in excise invoice print  mrp per unit value not showing, to find solution what process i need to follow
    please find attachment for screen shot.
    regards,
    sivakoti.

    Hi all
    i got solution from my issue , as above given MRP per unit value picking from MRP per case value,
    here if MRP per unit value is more than 3 digits(ex: 1000 rs/-) then value not appearing in excise invoice ,for this my ABAP r has done program variant changes for numeric length increased for MRP per unit field
    thank you to   G Lakshmipathi and Ashok Kumar Telugu for spending your valuable time on this issue .

  • Need Multiple Units of Measure for a given material due to multiple vendors

    Hello,
    We have a requirement where we must have multiple units of measue (each, box, case, pallet) for a given material.
    Background:
    We have multiple vendors for one SAP material number. We need to store 4 levels of units of measure for each vendor+material combination.
    Unit of Meaure levels
    1. Each
    2. Innerpack (ex: 12 each = 1 innerpack)
    3. Box (ex: 36 eaches = 1 box)
    4. Pallet (ex: 100 eaches = 1 pallet)
    Standard SAP allows in MM01 additional data --> Units of Measure only 1 Ea, Box, Plt, etc.
    Our requirement is to allow multiple Units of Measure due to multiple vendors providing the same material.
    So, our unique combination is by a Material+Vendor.
    We are considering adding the vendor name and vendor number to the material master --> additional data --> Units of Measure tab.
    Does this seem like a good solution? What impacts do you foresee with approach?
    Any alternatve solutions?
    We thought we could enhance the purchasing info records to allow multiple units of measure too but then we need to also add many fields to hold the weight, lenght, height, width, volume, country of origin, etc.
    Please recommend a best practice or solution to handle this requirement.
    Thanks in advance!!!

    Hi,
    Maintain the alternative units in Material Master in Additional Data -> Units of Measure section with proper conversion factors.
    Create individual info-records i.e. per mtl-vendor combination & in the info-record maintain the order unit, along with other details as required.
    Now when you create a PO, the details will be read from the info-record. To test the same, create them in your sandbox & see if it meets your requirement.
    Hope the above clarifies your query.
    Regards,
    Vivek

  • HELP Make Settings for Units of Measurement for Monitoring of Consumption

    Hello All:
    I just cant' define an unit of measure to stablish consumption calculation. I know how to make all the other settings, but I just can't stablish the unit of measure to use in there.
    Could please somebody gime this explanation ? Step by step ?
    I've read that are preconfigured units of measure for examplo MPG miles per gallon US but I will use Kilometers per litre.
    I want to know how to create this unit
    how to link it with an existing SI group
    So I can use it in the step Make Settings for Units of Measurement for Monitoring of Consumption
    thanks in advance
    Luis Henrique

    Dear Luis,
    Please use CUNI t code for creating unit of measurement. Please follow any exist Unit of measurement and replicate the same. This is a configuration so will have transport requirement
    Regards
    Gajesh

  • For Vehicle ...BOM vise materail cost per unit

    Hello Experts
    ON BW i need to create a report for Vehicle on  material cost per unit vise (BOM vise). ...... I need your help.
    With Regards

    Its not possible to give any specific section where it might have gone wrong. Suggest you to check the complete configuration under Settings for Fleet Management. Also check the configuration in IMG - PM & CS - Information Systems - Configure Measurement document update

  • Unit of measure for calculation type C must be completed

    Hi All
    When releasing some contracts in SRM , we are getting the error message as above.
    The error message doesn't specify any particular part and the contract has more than 3000 parts.
    There are no conditions at header or item level.
    There is no Target quantity also. Just a Target value for the contract and prices for individual items are maintained.
    We are using extended classic scenario and the contract is manually created in SRM.
    I have checked the OSS notes for this error, but they are mostly for contract creation in Bidding and not for a manually created SRM contract.
    We checked the UOMs for all the contract parts with the UOMs ( Base and Purchasing) in ECC Material Master and they are OK.
    In our scenario , MM changes in ECC are replicated to SRM in real time
    Any pointers towards pin pointing the error will be rewarded!
    Regards
    Kedar

    Hi,
    We encountered this error message and resolved the problem by applying the following 3 SAP Notes:
    a)     Note #1022928 - Unit of Measure for Calculation Type C Must Be Completed
            (Previously Mentioned)
    b)     Note #1702484 - Unit of Measure for Calculation Type C Must Be Completed
    c)     Note #1517648 - Default Conditions Added for Product Category Item Type
    Although the contract required is similar to a "Limit" item, but had to be placed for bid, then the RFX PS Item Type was set to "Service" to receive the bid responses.  After accepting the bid response, then we created a contract from the bid response.  Since it was to be a "Limit" type contract, then we immediately removed the data from the following fields:
    Remove the Quantity
    Remove the Unit of Measure
    Remove the Price
    Remove the Price Condition
    After removing the values from these fields, then we switched the PS Item Type from "Service" to "Product Category".  We added the Guaranteed Minimum and account assignment data to encumber the funds.  We were able to "Release" the contract successfully.
    Bob Zinsmeister

  • Pricing Procedure for diffrent unit of measure for diffrent product

    1) Existing Pricing procedure --> Condition type based on Quantity
    2) Existing Product --> Sales Unit & Base Unit of Measurement is in NOS ( Numbers )
    3) New Product ( Belt ) ---> Pricing of product based on weight
    ex :--> Rubber Belt -->   1 belt = 11.50 kg , Price = Rs. 100/ kg
    As the production of material will go on weight of Belt will reduce in range of 11.50 to 11 kg . For different batch of production weight will change
    every time weight of material will be calculated and price will be charged on basis of net weight ( Kg)
    4) New product is assigned to new division ( it will bw sold in new division only )
    Question
    1) What should be Base Unit / Sales Unit  of measurement ?
    2) Do we need to create new pricing procedure or existing pricing procedure will work ?
      for new product  we need to create new condition type for which calculation type will be Net Weight .
    3) do we need to do any customization for this ?
    Exice people say that if pricing is done in KG (Net weight ) they want to see stock in KG
    Management want to see stock in KG & Numbers

    May be you can Create a New Unit Of Measure called ZPC. For using ZPC you need to assign Additional Base Unti Of Measure as ZPC in your Material Masters as well.
    Use ZPC to create your condition records of pricing and in Sales order you will still have Unit of Measure as PC which the management wants to see..
    Similarly you can create Constion records for new product based on Kg.

  • IS-Retail:how to maintain different unit of measures for a article

    hi experts,
                    can anyone tell me how we maintain different unit of measures for sales and purchasing for a article.base unit of measure,order unit,var unit.Hope for a good answer.
    Regards

    Hi,
    Go to MM42, select basic data view
    In,Units of measure/ EANs /dimensions sub tab
    there u can see four radio buttons
    B.Un    Unit of measure is base unit (used internally only) 
    O.Un    Unit of measure is the order unit                             - Purchasing
    D/L.Un  Unit of measure is delivery unit/issue unit              - Logistics
    S.Un    Unit of measure is the sales unit                             - Sales
    for eg:
    First line enter EA (each) or PC (piece) in Auom for a material and  enter 1 in Number and select radio button for B.Un
    Second line enter CT (carton) in Auom and  enter 10 in Number and select radio button for O.UN (when you creating a PO it UOB automatically picks as CT)
    Third line enter PALin Auom and enter 50 in Number and select radio button for D/l .UN (when u creating a delivery UOB picks as PAL ie pallets)
    Fourth line enter EA or PC and enter 1 in Number and select radio button for S.UN (when u creating a Sales order UOB picks as EA or PC as u defined)
    Mohan

  • Alternative unit of Measure for variant material

    Dear All,
    Here is an interesting scenario,
    There is a naterial Billet with two variant characteristics length and size. and base unit of measure is TON. Now alternative unit of measure is PCS.  How can define the conversion factor on the basis of these two variant characteristics.
    In normal material (without variant char.)
    we can define conversion factor 1PCS= 2TON
    For variant material,
    For the material Billet with variant charc length and size how can i define conversion
    so that system calculates diff. PCS with diff. length and size but material is same. So how can i Do that.
    for example for same material Billet but variant char. Length is 6 M and size is 120*120 ,its wt will be 2 TON for 1 PCS.
    for the same material Billet with variant char. length 12 M and size 120*120, its wt will be 12TON for 1 PCS.
    How can i cater this for the same material.

    Hi Shoaib,
    We have faced the similar scenario for steel industry. Based on my experience, it is not possible to define variable values for Alternative UOM conversion with the variant characteristic/configuration, specially if you want SAP to maintain inventory with variable conversion rate.
    Use the Batch specific unit of measure for this situation.
    1) Create batch specific UOM i.e. Ton_per_pc (TOP) --- User proportional unit conversion
    2) Create batch characteristic ton_per_pc and assigned UOm.
    3) In material master additonal data select proportion unit and enter the standard conversion rate between ton & pcs.
    4) While doing GR - In batch creation you can enter whatever the conversion rate is and Inventory will be updated accordingly.
    Regards,
    Ravi.

Maybe you are looking for

  • Please help me download and install Flash Player!

    One day, I had no problems viewing Flash on my computer. Then one day last week, it told me I needed to download Flash Player 8 to view The Vine on E!Online. I haven't been able to download Flash Player 8 or 9. Or anything from this site, for that ma

  • Post Goods issue using bapi_goodsmvt_create

    hi, Iam trying to do post goods issue using bapi_goodsmvt_create. please let me know what are the mandatory fields to be passed?

  • How to save a pdf with multiple slides per page

    I have multiple pdf files that I would like to combine but for some of those files, there were originally from powerpoint. For those files, I would like to change the pdf so that there are multiple slides per page. I don't have a copy of the original

  • ECC 6.0, BI & EP Installation & Config?

    Hi Experts,                 I need to install ECC 6.0 , BI and Portal, So i selected ECC and WAS ABAP,WAS JAVA, BI, EPCORE, EP. The installation completed successfully. I am able to login to ECC with clients 000,001 and unable to login to 800, 811 an

  • I have rented a movie through my iPad 2 but it never finishes waiting...

    I have a brand new iPad2 but I can't buy or rent a movie - the download never starts, I get a "waiting..." message that hangs in there forever. When I bought a movie I had to download it from my MacBook and then sync it up with the iPad. Now it's a r