Percentage of sales for Similar members

Hi I have one isssue in writing MDX for the below requirement..
       There are two dimensions called Product and Customer..
For Product category Bikes there are 3 customers who purchased it..
Products    Customers
Bikes          x,y,z
Components  x,y,z,w
Accessories   x,y,a
I want the following output if the currentmember is Bikes: x+y+z/(x+y+z) (From Components)+ (x+y) (from Accessories)
Please help me on writing MDX
Venkata Koppula

Hi Venkata,
In your scenario, you can extract all the other product categories except the current category that the current customers who purchased it. And then use sum function to calculated the sales amount for those product categories. Here is a sample query
in AdetureWorks for you reference.
with set [a]
as
EXTRACT(
NONEMPTY(
{except([Product].[Product Categories].[category].members,[Product].[Product Categories].currentmember)}
{[Customer].[Customer Geography].currentmember}
{[Measures].[Internet Sales Amount]}
, [Product].[Product Categories])
member [measures].[b]
as
sum([a],[Measures].[Internet Sales Amount])
select {[measures].[b]} on 0,
{[Product].[Product Categories].[category].members}*{[Customer].[Customer Geography].[Country].members}
on 1
from
[Adventure Works]
Reference
http://msdn.microsoft.com/en-us/library/ms145980.aspx
http://msdn.microsoft.com/en-IN/library/ms144900.aspx
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • Quantum Gateway Router on sale for $99

    Verizon currently has the Quantum Gateway Router on sale for $99 until 1/17/2015.  Details are here:
    http://campaign.verizon.com/fiosquantumgateway/?My​VzSPLDEALS=WIFI_ROUTER
    Enjoy.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

    Figures.. I'm just now seeing info on the "new" Quantum Internet Router which triggered me to do some web research and low and behold, Verizon had a half price "promo" sale, but never told me about it! No email, no notice, etc.. Until the "promo" was over.. Bottom line I would of upgraded a second time buying their new router but being a longterm customer and buying the last (rev I) Advanced router about a year ago, I refuse to pay $199.00 for a second upgrade to a wireless router in less than two years.. You know, I just upgraded to a Quantum TV too in December and no one mention or offered the "Quantum" Internet at the same time.. And the DVR playback function takes 20-30 seconds for the recorded video to start playing.. UGH!
    Guess I'll be buying a 3rd party router with similar features as the Gateway for a lot less to fix what the (rev I) upgrade never really corrected and based on the faults of the Quantum TV DVR faults, looks to now be the better and lower cost option to do in order to get more reliability and stability in watching & managing Recorded Video and increased Wireless Internet Performance.. Ironically I plugged in my ole' reliable Linksys WGT54 which I used for years with no performance issues and it has better wireless stream performance that the Verizon Actiontec rev I wireless router..

  • Intercompany Sales for 3 companies

    Hi All Expert,
    I am now facing big problem in setting of Intercompany sales.
    Now I want to set a new Company C, with Sales and Bill to Oversea customer,
    but goods are purchased from Company B,
    and the goods are produced by Company A and Ship to Customer directly from Company A.
    Customer <-- Sales Order / Bill --- Company C  --- Purchase Order ---> Company B --- Intercompany Sales ---> Company A --- Goods Delivery ---> Customer
    a. Company C Sale and Bill to the Customer (Normal Sales)
    b. Company C purchase goods from Company B (Intercompany Sales)
    c. Company B purchase goods which produced by Company A (Intercompany Sales)
    d. Company A ship goods directly to the Customer (Goods delivery)
    How to set this Intercompany sales for three companies?
    Thanks.
    Terry
    Edited by: Kin Hang, Terry NGAI on May 7, 2009 9:31 AM

    Hi Terry,
    We have done a very similar kind of scenario for our client. We have done it for 4 company codes. Actually, standard SAP can handle intercompany sales between only 2 compnay codes. So, this requirement (with 3 companies) calls for an enhancement. You will have to create a couple of Z tables to achive this scenario. First Z table to update the partner function and the second one for the selection of sequence in which the companies need to be billed. And you can use a BAPI (BAPI_SALESDOCU_CREATEFROMDATA) to create intercompany invoices from company B to C further automatically. Hope this gives you an idea to start the work. Let me know if you need any further help.
    Regards,
    Raghav

  • Promotional sales for sooner expiry date products

    Dear SAP gurus,
    I have following situation:
    My customer sells batch manged products and batches are based on expiry date. Batch is detemined at delivery creation with FEFO rule (first expiry first out).
    Now they have some older date batches that they want to give at a lower price. Since batch is not determined at sales order creation my solution would be to create new "promotional" code for that material, then with mvt type 309 transfer old batch quantity to new material, set new sales price for new material and sell it until this stock is sold out. Then this promotinal code could be used in future also for similar situations for that material.
    Is this the best solution? Any thoughts?
    Thanks,
    Suad.

    Dear Saud,
    The better option would be to give a discount on specfic batches (condition type KA00).Since batches are not determined at order level ,the condition KA00 would be redetermine at the time billing.
    Also check the pricing setting of copy control from delivery to bill.
    Regards
    Sanjay

  • LENOVO G560 on sale for $429.99 - saw it at Office Depot

    LENOVO G560 on sale for $429.99 - saw it at Office Depot yesterday
    Bought one and it is working great - only thing, the speakers' sound is really without any bass, and no HDMI   :-(
    http://www.officedepot.com/a/products/289194/Lenovo-G560-0679-99U-Laptop-Computer/

    I have a G560 0679-3JU and the sound is great! The speakers are powerfull compared with another laptops.
    IPnaSh
    First Spanish Community Guru - Colaborador ad honorem

  • Daily sales by month and cumulative sales for year

    Hi Experts,
    I have a reporting requirement where I have to show daily sales by month and cumulative daily sales for particular month for the year.
    e.g. If the current month is January then my result shows fine. see below
    Calendar Day
    Net Sales
    Target
    Sales Year
    Actual
    Target
    01/01/2014
    100
    90
    01/01/2014
    100
    90
    02/01/2014
    200
    180
    02/01/2014
    300
    270
    03/01/2014
    300
    290
    03/01/2014
    600
    560
    04/01/2014
    400
    350
    04/01/2014
    1000
    910
    But If I am in the month of Feb and I want to show sales for the month and cumulative sales for the year for just Feb but instead of showing cumulative total from 01/01/2014 to end of Feb it starts again at begining of Feb - See below
    e.g. 
    Calendar Day
    Net Sales
    Target
    Sales Year
    Actual
    Target
    01/02/2014
    200
    190
    01/02/2014
    200
    190
    02/02/2014
    400
    380
    02/02/2014
    600
    570
    03/02/2014
    600
    590
    03/02/2014
    1200
    1160
    04/02/2014
    800
    750
    04/02/2014
    2000
    1910 
    Expected Result - sales for the year shoud show cumulative result from 01/01/2014 - 31/12/2014
    Calendar Day
    Net Sales
    Target
    Sales Year
    Actual
    Target
    01/02/2014
    200
    190
    01/02/2014
    1200
    1100
    02/02/2014
    400
    380
    02/02/2014
    1600
    1480
    03/02/2014
    600
    590
    03/02/2014
    2200
    2070
    04/02/2014
    800
    750
    04/02/2014
    3000
    2820 
    How do I achive this?
    please help.

    What else you need?
    looks like you got #working days for the month, use that metric as of jan 15th

  • Report on sales for Customer - Material wise

    Hi,
    Do we have any std report in SAP.
    So that I can find out what are all the sales for the rel customers & set of products?
    or shall i go for any development?

    Dear SAP Consultant ,
    Try with
    MCTA and MCTC transaction.
    I hope this will help you,
    Regards,
    Murali.

  • Adding Cost of Sales for Non-Stock articles to POS Inbound Pricing Schema

    Hi guys
    I'm working on a requirement to derive the Cost of Sales for non-stock items by pulling the current cost for the site and multiplying it by the billed quantity on VBRP. We could create a new condition type using purchase org, article and site in the condition table and manually enter condition records. However it would be more elegant to copy prices from the Purchasing list or deal prices into new condition types in the POS inbound pricing procedure. However SAP standard doesn't seem to allow condition copying from purchasing to sales.
    Regards
    Brett

    Hi ,
    As it happens you need to do this for Non-Stock Articles only.... then you need a routine to do this .
    And then in IS -Retail do  we not use  NETPrice or Final Cost Price to derive the Sales Price ... In that case you get the Cost Price when the Billing doc is getting posted at line level...
    Regards
    Amitava

  • I have multiple lines for family members on my account. Can I still transfer upgrades between lines? I don't see the option any more.

    I have multiple lines for family members on my account. Can I still transfer upgrades between lines? I don't see the option any more.

    More everything. I have one line coming up on the 19th of this month and I'd like to transfer to another user with a later upgrade date. Just not seeing the option anywhere.

  • Error while accessing application of Mobile Sales for Handhelds

    Hi all,
       I am working with Mobile Sales for Handhelds. I downloaded a source code for "Mobile Sales & Service for HH using CRM 4.0 SP08" from SAP note 824427. After creating a WAR file out of this code and assigning it to the user through web console successfully, I synchronized. But when I tried to access the application by the link, I get a Included servlet error. The stack trace is as follows :
    Included servlet error: 500
    Location: /CRMHHSALES/start
    Error Location: /CRMHHSALES/main/BaseMenu.jsp
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\Program Files\SAP Mobile Infrastructure\work\localhost_8080%2FCRMHHSALES\_0002fsystem_0002fError_0002ejspError_jsp_0.java:15: Class com.sap.crm.handheld.logic.gui.Skin not found in import.
    import com.sap.crm.handheld.logic.gui.Skin;
           ^
    C:\Program Files\SAP Mobile Infrastructure\work\localhost_8080%2FCRMHHSALES\_0002fsystem_0002fError_0002ejspError_jsp_0.java:16: Class com.sap.crm.handheld.core.utils.EncodingHelper not found in import.
    import com.sap.crm.handheld.core.utils.EncodingHelper;
           ^
    C:\Program Files\SAP Mobile Infrastructure\work\localhost_8080%2FCRMHHSALES\_0002fsystem_0002fError_0002ejspError_jsp_0.java:17: Class com.sap.crm.handheld.logic.gui.Skin not found in import.
    import com.sap.crm.handheld.logic.gui.Skin;
           ^
    3 errors, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(RequestDispatcherImpl.java:400)
         at org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl.java:270)
         at com.sap.crm.handheld.core.webtools.ControllerServlet.displayPage(Unknown Source)
         at com.sap.crm.handheld.core.webtools.ControllerServlet.saveStateAndDisplayPage(Unknown Source)
         at com.sap.crm.handheld.core.webtools.ControllerServlet.handleRequest(Unknown Source)
         at com.sap.crm.handheld.core.webtools.ControllerServlet.handleRequestWrapper(Unknown Source)
         at com.sap.crm.handheld.core.webtools.ControllerServlet.doGet(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:402)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:534)
    Can anybody help me in this issue?
    Thanks in advance.
                     Saptak.

    Hi Saptak Kulkarni ,
    <<<
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\Program Files\SAP Mobile Infrastructure\work\localhost_8080%2FCRMHHSALES\_0002fsystem_0002fError_0002ejspError_jsp_0.java:15: Class com.sap.crm.handheld.logic.gui.Skin not found in import.
    import com.sap.crm.handheld.logic.gui.Skin;
    ^
    C:\Program Files\SAP Mobile Infrastructure\work\localhost_8080%2FCRMHHSALES\_0002fsystem_0002fError_0002ejspError_jsp_0.java:16: Class com.sap.crm.handheld.core.utils.EncodingHelper not found in import.
    import com.sap.crm.handheld.core.utils.EncodingHelper;
    ^
    C:\Program Files\SAP Mobile Infrastructure\work\localhost_8080%2FCRMHHSALES\_0002fsystem_0002fError_0002ejspError_jsp_0.java:17: Class com.sap.crm.handheld.logic.gui.Skin not found in import.
    import com.sap.crm.handheld.logic.gui.Skin;
    ^
    >>>
    Check whether u have imported these classes or not,,
    import com.sap.crm.handheld.logic.gui.Skin;
    import com.sap.crm.handheld.core.utils.EncodingHelper;
    import com.sap.crm.handheld.logic.gui.Skin;
    these classes in your JSP file during modification ..
    i think u have used these all external classes in your JSP files without importing these classes...
    If u have imported these class files , then check , u have properly set path for these library (jar files) in the MI client itself.
    <b>If ur MI applications are using some extra jar files , then in the client device , that jar files must present in the lib directory of MI installation</b>.
    <b> These jar files must be set in the classpath while  starting the  MI client...</b>
    just refer this forum for setting classpaths in the client device for additional jar files ...
    Re: External API in MI application
    Regards
    Kishor Gopinathan

  • AR/AP & SALES for period  CALCULATION on top of 0FIAR_C03/0FIAP_C03

    hi,
    i want to create DSO/DPO report on top of 0FIAR_C03/0FIAP_C03 line item cube .so please tell me in detail on how to calculate account recievable/account payable  & sales for the period calculation by just  having credit and debit as keyfigures.  Please specify in detail
    Expect a quick reply...
    Thanks & Regards,
    Montz
    Edited by: montz2006 on Aug 2, 2010 7:33 PM

    Guys  ,
    Plz reply....

  • Date of last sale for a Material

    Hello all,
    Is there a place where SAP stores date of Last Sale for a Material ? I am looking for an info structure, where SAP stores date of Last sale for each material and keeps on updating that, for each transaction.
    I know that I could get it from VBAK, or VAPMA (If I need to get it plant wise), but to read all the orders, and find one with the highest AUDAT is giving very poor performance. Select MAX and for all entries dont work together.. so system is dying doing this select..
    Is there a straight forward way of doing it ?
    S032-LETZTABG gives date of Last Issue, but we have stock transfers, intercompany...and so many other stuffs.. so an issue may not necessary be a sale. So that also dont help..
    appreciate your inputs.
    Thanks

    Srinath,
    VAPMA or VRPMA ---  either stores all transaction document numbers --  VAPMA stores orders, and VRPMA stores Billing docs.
    Hence reading from these tables to get date of last sale is bringing the system down...
    What am wondering is whether there is a table at more master data level, say, at Material and plant level, and just store the date of latest sale against Material.
    I prefer VAPMA over VRPMA for 2 reasons.
    1. I need the result in a plant level.. VRPMA dont have WERKS whereas VAPMA do.
    2. I need to grab even the latest sales order created - Even though it is not yet delivered/invoiced...  VRPMA will have it only after billing..
    Looks like, SAP is not storing date of last sale anywhere.

  • Compare two datasets in crosstab by showing percentage of sales

    I am wanting to compare two datasets in a crosstab chart.
    Basically I have a sales table and a business costs table. 
    My business costs table fields look like this:
    Category
    CostDate
    CategoryCost
    My sales tabel looks like this:
    PartNumber
    SalesDate
    SalesAmount
    In my crosstab I want to group my rows by Category and my columns by Month.
    So that in my summaries I can show sum of category cost and the percent of sales for that particular month.  I can do everything except show percent of sales for that specific month. My sales table has a SalesDate that I will be using to group off of.
    Any ideas on how to do this, I am not sure where to even start. I am still new with crystal reports.
    my sales data
    PartNumber     SalesDate     SalesAmount
    Part1     1/1/2011      $1.00
    Part2     1/1/2011      $1.00
    Part3     1/1/2011      $1.00
    Part4     1/1/2011      $1.00
    Part5     1/1/2011      $1.00
    Part6     1/1/2011      $1.00
    Part7     2/1/2011      $1.00
    Part8     2/1/2011      $1.00
    Part9     2/1/2011      $1.00
    Part10     2/1/2011      $1.00
    Part11     2/1/2011      $1.00
    Part12     2/1/2011      $1.00
    Part13     2/1/2011      $1.00
    My business cost data
    Category     CostDate     CategoryCost
    Office     1/1/2011      $1.00
    Office     2/1/2011      $1.00
    Warehouse     1/1/2011      $1.00
    Warehouse     1/15/2011      $1.00
    Warehouse     2/1/2011      $1.00
    Quality     1/1/2011      $1.00
    Quality     2/1/2011      $1.00
    Quality     2/15/2011      $1.00
    What I want my crosstab to look like
                      Total       |                     1/2011  |                   2/2011     
         Business cost  |  % of Sales  |  Business cost  |  % of Sales |  Business cost  |  % of Sales
    Total  |  $8.00  |  62%  |  $4.00  |  67%  |  $4.00  |  57%
    Office  |        $2.00  |  15%  |  $1.00  |  17%  |  $1.00  |  14%
    Quality  |        $3.00  |  23%  |  $1.00  |  17%  |  $2.00  |  29%
    Warehouse  |  $3.00  |  23%  |  $2.00  |  33%  |  $1.00  |  14%

    Hi Joshua,
    assuming that you have linked your two tables and built a crosstab report:
    In the summary data field you summarize 2 fields
    1. your SUm of Business Cost
    2. your Sum of sales.  -> Edit that summary to show % of the Table field you want to summarize and select by column

  • Is there any API for Shared Members

    Hi All ,
    Can any one let me know whether there is any API function for Shared Members? I could not find anything from http://download.oracle.com/docs/cd/E12032_01/doc/epm.921/html_api/api_c/mac/tocmacfa.htm
    Please do help...Thanks in advance

    I am assuming you are on 9.2 as that is the link you posted, all the details you need are in the docs - http://download.oracle.com/docs/cd/E12032_01/doc/epm.921/html_api/topapilist.htm
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to validate a field of type text for similar values

    Hi,
    My requirement is to validate a field <b>Name1</b> of type Text[40] for similar values when a new record is created. So If the Name1 already exist in repository, the validation has to give warning message saying the customer with Name1 already exist.
    Regards,
    Madhu

    Hi Madhu
    To validate a particular field, when a new record comes along with the same value SAP MDM is not capable of generating warning messages, but we can have best method of Tracking at Import manager level.
    In the Import manager after successful mapping, access the MATCH RECORD tab. Go to the Default import action area there you can find Match type & Default import action. For example if you are sending same Material record which is already available in the Repository, Match type will have the value “EXACT” where as Default Import action will have “UPDATE (ALL MAPPED FIELDS or NULL FIELDS)”.
    Here I have copied various Match types as well as Default Import Actions along with the definitions, pls go thru the same and feel free to revert to me for further clarifications.
    <u><b>Default Import Action</b></u>
    <b>Skip -></b> Skip source value combinations that already
            exist.
    <b>Update(NULL Qualifiers Only) -></b>     Update just the NULL remaining qualifiers of each existing qualified lookup value.
    <b>Update (All Mapped Qualifiers)-></b> Update all the remaining qualifiers of each existing
    qualified lookup value.
    <b>Replace -></b> Replace all the remaining qualifiers of each existing qualified lookup value by first deleting them and then creating a new value combination.
    <b>Delete -></b> Delete this qualified lookup value during import Processing.
    <u><b>Match Type</b></u>
    <b>None -></b> None
    <b>Exact -> </b> Whether the match type for the destination record with the current source
    record is Exact.
    <b>Partial -></b> Whether the match type for the destination record with the current source
    record is Partial.
    <b>Conflict -></b> Whether the match type for the destination record with the current source
    record is Conflict.
    Thanks
    Alexander
    Message was edited by: Alexander Raja

Maybe you are looking for