Exists function- For common products in two sets

Hi All ,
I have this below mdx query , where i want the common products that were submitted in december 2014 and present in the following two sets 
i) First Set :  List of apps  which are set by required attribute in ManualReview dimension as "true" ,result attribute is "fail" for them  and  Submitted date is
December 2014 
ii) Second set : List of products where IsAutopassed is "True"  and Submitted date is
December 2014  . 
Below is the mdx query for this. But i am not able to get common products out of these two sets . i.e. i want to implement the sql functionality of 
SELECT * FROM SET1 WHERE PRODUCTID IN ( SELECT PRODUCTID FROM SET2)
SELECT
non empty
EXISTS(
[DimProduct].[ProductId].[ProductId].members,[DimManualReview].[Required].&[True],
[DimResult].[Result].&[Fail],
[DimSubmittedDate].[Calendar Date Hierarchy].[Year].&[Calendar 2014].&[Quarter 4, 2014].&[December 2014]
[DimProduct].[ProductId].[ProductId].members, [DimProductSubmission].[IsAutoPassed].&[True],
[DimSubmittedDate].[Calendar Date Hierarchy].[Year].&[Calendar 2014].&[Quarter 4, 2014].&[December 2014]
) ) ON ROWS,
non empty [Measures].[ProductCount] ON columns
FROM RAD
Please help me in getting in to a right direction.

Hi NedunuriRajesh,
According to your description, you want to get the common member from two sets. Right?
In this scenario, I suggest you use INTERSECT() the intersection of two input sets. Please try the MDX below:
SELECT
non empty
INTERSECT(
[DimProduct].[ProductId].[ProductId].members,[DimManualReview].[Required].&[True],
[DimResult].[Result].&[Fail],
[DimSubmittedDate].[Calendar Date Hierarchy].[Year].&[Calendar
2014].&[Quarter 4,
2014].&[December 2014]
[DimProduct].[ProductId].[ProductId].members,
[DimProductSubmission].[IsAutoPassed].&[True],
[DimSubmittedDate].[Calendar Date Hierarchy].[Year].&[Calendar
2014].&[Quarter 4,
2014].&[December 2014]
ON ROWS,
non empty [Measures].[ProductCount]
ON columns
FROM RAD
If you have any question, please feel free to ask.
Simon Hou
TechNet Community Support

Similar Messages

  • Using pl/sql function for each day between two dates.

    Hi,
    create TABLE EMP(
    ID_EMP NUMBER,
    DT_FROM DATE,
    DT_TO DATE,
    CREATE_DATE DATE);
    into EMP(ID_EMP, DT_FROM, DT_TO, CREATE_DATE)
    Values(100, TO_DATE('07/01/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/30/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),TO_DATE('05/08/2009 14:11:21', 'MM/DD/YYYY HH24:MI:SS'));
    I have a function called  elig_pay_dates(date p_date), which returns the code for  person payment eligibility for a particular date. For paid dates it's 'P' and for unpaid dates it's 'N'.
    How can I check this function between two dates for each day. Example : 07/01/2008 to 04/30/2010.
    By using this function with select I needs to display the dates when there is a change in status.
    I am expecting data in following manner from above logic(this is example):
    07/01/2008 --- 07/01/2009 ---'P'
    07/02/2009 -- 07/25/2009 ----'N'
    07/26/2009 -- 01/01/2010 ---'P'
    01/02/2010 -- 01/13/2010 --'N'
    01/14/2010 -- 01/18/2010 --'P'
    01/19/2010 -- 04/30/2010 -- 'N'
    I thought of looping for each day date but that seems to be expensive for online application. Is there any way that I can achieve this requirement with sql query ?
    Thanks for your help,

    Certainly not the best way to code the requirement, but it does achieve the result you are looking for in a fairly quick time
    create or replace
    function test_ret_paid_unpaid (p_date in date)
    return varchar2
    is
      v_ret     varchar2(1);
    begin
      if ( (p_date between to_date('07/02/2009', 'MM/DD/YYYY') and to_date('07/25/2009', 'MM/DD/YYYY') ) or
           (p_date between to_date('01/02/2010', 'MM/DD/YYYY') and to_date('01/13/2010', 'MM/DD/YYYY') ) or
           (p_date between to_date('01/19/2010', 'MM/DD/YYYY') and to_date('04/30/2010', 'MM/DD/YYYY') )
        then v_ret := 'N';
      else
        v_ret := 'Y';
      end if;
      return v_ret;
    end;
    Wrote file afiedt.buf
      1  with get_paid_unpaid as
      2  (
      3    select dt_from start_date, dt_to end_date, dt_from + level - 1 curr_date, test_ret_paid_unpaid(dt_from + level - 1) paid_unpaid,
      4           row_number() over (order by dt_from + level - 1) rn_start,
      5           row_number() over (order by dt_from + level - 1 desc) rn_end
      6      from test_emp
      7    connect by level <= dt_to - dt_from + 1
      8  ),
      9  get_stop_date as
    10  (
    11  select start_date init_date, end_date, curr_date, paid_unpaid,
    12         case when paid_unpaid != lag(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
    13          then curr_date
    14          else null
    15         end start_date,
    16         case when paid_unpaid != lead(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
    17          then curr_date
    18          else null
    19         end stop_date
    20    from get_paid_unpaid
    21  )
    22  select period, paid_unpaid
    23    from (
    24  select init_date, curr_date, start_date, end_date, stop_date,
    25         case when paid_unpaid = lead(paid_unpaid) over (order by curr_date)
    26                then nvl(start_date, init_date) || ' - ' || lead(stop_date, 1, end_date) over (order by curr_date)
    27              else null
    28         end period,
    29         paid_unpaid
    30    from get_stop_date
    31   where stop_date is not null or start_date is not null
    32         )
    33*  where period is not null
    12:06:10 SQL> /
    PERIOD                                             PAID_UNPAID
    01-JUL-08 - 01-JUL-09                              Y
    02-JUL-09 - 25-JUL-09                              N
    26-JUL-09 - 01-JAN-10                              Y
    02-JAN-10 - 13-JAN-10                              N
    14-JAN-10 - 18-JAN-10                              Y
    19-JAN-10 - 30-APR-10                              N
    6 rows selected.
    Elapsed: 00:00:00.35

  • Aggregate function for a report that has sets

    My report combines similar analysis into sets. I need to apply aggregate function such as Max() to the resulting columns. I tried but Analytics doesn't like that. Can someone tell me if this is supported or not? If not, what would be a workaround?

    Have you tried placing the results into a pivot table then assigning this to display MAX results

  • Can we generate two invoice  for same product in two different currency

    dear all gurus,
    actually we are in export sales
    so we are generating export invoice.
    my client is asking for another invoice in INR too this is called comercila invoice
    with this i ve to generate the ARE form
    so how to do this three things
    1.export invoice in foreign currency
    2.commercial invoice in INR
    3.ARE form with referance to this export sales
    with regards
    subrat

    Hi Subrat,
    I really dont know how this scenario can be handled.
    2invoices for the same order is not allowed legally also. So if the user is asking for it, may be first they need to discuss this with their legal department.
    If they say ok, then you may think of only an output, where you can change the values with a standard exchange etc. But having 2invoices in the system of different currencies for a single sales order will lead to lot of problems in reporting.
    Can somebody throw some light on this, on how to enable this without any problems.

  • Search function for Product description in shopping cart

    Hi,
    We are using SRM 5.5 version. We have a problem when we are searching the Product with the Product description.
    Shop -> Create Shopping Cart -> Internal Goods/Services
    Enter a pattern between the stars such as
    *cap*
    and then Click Start.
    System is not restricting the search output with the pattern
    *cap*
    . Instead it is displaying all the Products and search is not getting restricted by the search function.
    When I was searching for an OSS note to fix this issue, i found the note(1322462) to fix a similar issue with the Product ID.
    Do we have any SAP note to fix the issue with the Product Description? Please guide me.
    With regards
    Krishna
    Edited by: krishnadasan on Nov 12, 2010 7:37 PM

    Hi Muthu,
    Current service pack  is SP 13(SAPKIBKT13).
    I believe this SAP note 1322462 can resolve the issue with search function for the "Product ID". I will implement this note and let you know the result.
    Do we have any SAP note to solve the issue with the search function for "Product Description"?
    With regards
    Krishna

  • Product ID Autogeneration for perticular Product Categoty

    hi,
    I need to implement the product ID Autogeneration functionality for perticular product category.
    scenerio is:
    While Creating New Product in Master Data after filling product category and other details after clicking "Save" button the Product ID should get filled automatically(Product ID Should generate Automatically ) for that perticular product category.
    Is anybody have any idea about this?
    Is there any BADI Available to autogenerate the product ID.
    Quick response will be appreciated...!!!
    Regards,
    Sanket Chougule.
    Edited by: sanket Chougule on Oct 6, 2008 11:20 AM

    Hi..
    I dont hv such idea but i think your Functional consultant can do this. they have to define this type of settings..
    Meet your functional consultant..
    rgds,

  • Labview functions for ni4351

    I'mlooking for a description of labview's function for ni 4351

    There are two APIs you can use in LabVIEW to program the NI 4351 device. The first is NI-DAQ, the other is the 435X driver. I would suggest using the 435X driver.
    Make sure you have installed the driver first.
    http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C128D?opendocument&node=132060_US
    After that, there will be a LabVIEW help file installed on your computer. You can find it here Start >> Programs >> National Instruments >> NI 435X
    I've also attached it below.
    Brian
    Attachments:
    ni435x_g.hlp ‏232 KB

  • Function module to get PPM for given product and/or location

    Hi,
    I want to check whether any PPM is existing for given product, location.which function module i can use for the same.

    There is a BAPI that might help - BAPI_PPMSRVAPS_GETLIST which has product and location selection criteria.
    Regards
    Laurence

  • Mdx error : Query (11, 9) Two sets specified in the function have different dimensionality.

    Hi all
    i am getting the fallowing error for the below mdx , what may be the issue?
    Query (11, 9) Two sets specified in the function have different dimensionality.
    WITH SET LastSample AS TAIL(NONEMPTY([Date].[Hierarchy].members *[Time].[Hierarchy].members,[Measures].[Overall LU SR]))
    MEMBER [KPI Name] AS "Overall LU SR"
    MEMBER [KPI Value] As KPIValue("Overall LU SR")
    MEMBER [KPI Status] AS KPIStatus("Overall LU SR")
    MEMBER ObjectName as "Overall LU SR"
    MEMBER [Critical Threshold] as  [KPI Thresholds].[Threshold1].&[Overall LU SR].member_value
    MEMBER [Major Threshold] AS  [KPI Thresholds].[Threshold2].&[Overall LU SR].member_value
    MEMBER [Minor Threshold] AS 0
    MEMBER latestDate as [Date].[Hierarchy].membervalue, format_string = 'mm/dd/YYYY'
    MEMBER latestTime as [Time].[Hierarchy].member_caption
    SELECT  {latestDate,latestTime,ObjectName, [KPI Name], [KPI Value],[KPI Status],[Measures].[Critical Threshold],[Measures].[Major Threshold],[Measures].[Minor Threshold]} ON COLUMNS
    ,nonempty(LastSample) ON ROWS
    FROM [DRA]
    Surendra Thota

    hi all
    i got the solution . i have add measures dimension to the name  ie ,[Measures].[KPI Name],
    WITH SET LastSample AS TAIL(NONEMPTY([Date].[Hierarchy].members *[Time].[Hierarchy].members,[Measures].[Overall LU SR]))
    MEMBER [KPI Name] AS "Overall LU"
    MEMBER [KPI Value] As KPIValue("Overall LU SR")
    MEMBER [KPI Status] AS KPIStatus("Overall LU SR")
    MEMBER ObjectName as "Overall LU SR"
    MEMBER [Critical Threshold] as  [KPI Thresholds].[Threshold1].&[Overall LU SR].member_value
    MEMBER [Major Threshold] AS  [KPI Thresholds].[Threshold2].&[Overall LU SR].member_value
    MEMBER [Minor Threshold] AS 0
    MEMBER latestDate as [Date].[Hierarchy].membervalue, format_string = 'mm/dd/YYYY'
    MEMBER latestTime as [Time].[Hierarchy].member_caption
    SELECT  {latestDate,latestTime,ObjectName,[Measures].[KPI Name], [KPI Value],[KPI Status],[Measures].[Critical Threshold],[Measures].[Major Threshold],[Measures].[Minor Threshold]} ON COLUMNS
    ,nonempty(LastSample) ON ROWS
    FROM [DRA]
    Surendra Thota

  • Mac or PC ?  - I believe that Adobe switched the processing functions for 3D rendering in Photoshop CC to VRam. To upgrade the Vram on my existing iMacs cost-effectively entails new upgraded iMacs. Is this affecting any of the other applications in the su

    Mac or PC ? - I believe that Adobe switched the processing functions for 3D rendering in Photoshop CC to VRam.
    To upgrade the Vram on my existing iMacs cost-effectively entails new upgraded iMacs.
    So I am now needing to purchase new desktop computers for production purposes and seperately for an education institute - PC's or Macs?
    Is this shift to Vram for image rendering affecting any processing functions of the other applications in the suite - the ones I use the most are Photoshop, Bridge, Lightroom, Illustrator, Premiere, After Effects, inDesign, & SoundBooth
    I also use Strata 3D, Lightwave, Maya, Cinema 4D, Logic Pro, Final Cut Pro,
    I will be using the suite in a Graphic design, Photography, Video editing / sound recording / editing (I am also a musician), animation and 3D context.

    This forum is primarily for a few users like me to answer questions about installation, serial numbers and general issues regarding the Creative Suite. We don't have to expertise to answer questions like you're asking. Otherwise, few people visit this forum.
    You'd do best to pick the forums of the applications you use the most, especially applications that test the limits of your computer (probably Premiere, After Effects, and Photoshop) and ask in those forums.

  • Is there a way to set up an automatic paste function for frequently used phrases

    Is there a way to set up an automatic paste function for frequently used phrases.
    My husband has an unusually long email address which he cannot change - he is not good at typing. I would like to help him by creating a sort of shortcut or auto paste function on his IMac to save him time and frustration. Any suggestions?
    Thanks

    Are you really using an earlier OS than Mac OS 8.6?  That would be either 8.1, or 8.5 if I recall correctly.
    Apple's classic forum, see:
    https://discussions.apple.com/community/mac_os/classic_mac_os?view=discussions#/ ?tagSet=1037
    You need to look for:
    -- remap or rename keyboard keys
    -- keyboard macros
    At this site look for
    http://trace.wisc.edu/world/computer_access/mac/macshare.html#applwindows
    EasyTyper 1.0.2
    TypeIt4Me
    resEdit maybe a possibility ... free
    http://hintsforums.macworld.com/archive/index.php/t-32745.html
    You could creae a file with common words & phrases in it & copy & past.
    SmartKeys 3
    http://trace.wisc.edu/world/computer_access/mac/macshare.html#applwindows
    Robert

  • Adobe Photoshop CS4 Extended, owned for ages, licensing for this product has expired? Was using it two months ago.

    Hello,
    I have been trying to get Adobe's help for over a month now. I've been on the phone twice to them, opened up three seperate cases and still arrived at no solution. I was bought Photoshop CS4 Extended awhile ago and use it for my studies (I'm an art student). Two months ago my harddrive on my computer failed and I had to have a new laptop. I went to reinstall Photoshop and "Licensing for this product has expired" comes up. I've uninstalled, inreinstalled many times and used Microsoft Fix It Programme for uninstalling to make sure all the files are gone.
    Surfing the forums I learned that there should be a folder with back up and Adobe PCD but I don't have that folder at all. The serial number I use is my original serial number that I know works and adobe have even said it's a technical error. What do I do? College starts again in two weeks and I don't have the programme I use for it!

    Try the License Repair Tool Adobe - Adobe Licensing Repair Tool
    Other suggestions if this doesn't work: Error "Licensing has stopped working" | Windows
    Also if you must uninstall, use the Adobe CS Cleaner tool, not the Microsoft one. Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • I have multiple apple devices mainly used between me and my wife , my question is that can i have two sets of contacts backed up to icloud one for her devices and one for my devices using the same itunes account

    i have two sets of devices one ipad, iphone and mac which i use and one iphone ipad and mac which my wife uses
    now is it possible to have two sets of contacts and calendar synchronised for her devices and one for my devices using the same icloud account
    i dont want a separate itunes account as we use the same music books and apps to be automatically downloaded which is very convenient
    please guide

    You can set up different iCloud accounts on each device using different Apple IDs (to keep your mail, calendars, contacts, etc. separated), and still share the same iTunes account (in Settings>Store on your device).  There is no requirement that you use the same Apple ID for purchases and for iCloud.

  • HELP!  I tunes wouldn't update so I tried to delete and reinstall.  I keep getting a message stating the installation source for this product is not available.  Verify that the source exists and that you can access it.  please help!!

    Help!  Itunes wouldn't update so I tried to delet and reinstall.  I keep getting a message: The instillation source for this product is not available.  Verify that the source exists and that you can access it.  I also get this message:  The feature you are trying to use is on a network resource that is unavailable.  Click OK to try again, or enter an alternate path to a folder containing the installation package 'iTunes64.msi' in the box below.  Help I have no idea what that means or how to fix it. 

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page). Here's a screenshot showing the particular links on the page that you should be clicking:
    After clicking one of the circled links, you should be taken to another page, and after a few seconds you should see a download dialog appear for the msicuu2.exe file. Here's a screenshot of what it looks like for me in Firefox:
    Choose to Save the file. If the dialog box does not appear for you, click the link on the page that says "CLICK HERE IF IT DOES NOT". Here's a screenshot of the page with the relevant link circled:
    When the dialog appears, choose to save the file.
    (2) Go to the Downloads area for your Web browser. Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • So my Ipod touch hasn't been connecting to computer, or charging for a week or two until i turn it off completely and now i try to reset all content and setting, the circle goes round and round for like hrs(24) and it still does not complete the reset

    so my Ipod touch hasn't been connecting to computer, nor charging for a week or two until i turn it off completely and now i try to reset all content and setting,(thinking it may connect to the computer and itunes and also charge) but the circle goes round and round for like hrs(24) and it still does not complete the reset.
    pls pls pls pls help .
    i have tried alot of solutions, but non of them have worked.

    Have you tried walking it into the nearest Apple Store and asking for assistance there...?
    I'm guessing you don't have Apple Care on it.

Maybe you are looking for

  • Excise Base is Zero! STO

    Hi to all, I am facing a problem in ECC5.0 and stuck in stock transport order between plant to plant. I have followed the steps as below: Creating stock transport order. Creating Outbound delivery Doing PGI creating performa invoice - Billing documen

  • Using a US Airport Extreme in England

    I have an Airport Extreme that I've been using in my home in Maryland for wi-fi. Now I'm moving to England. Will the Airport Extreme work over there? I see two potential issues: The plug that's supplied won't fit in the British outlet. And do they us

  • How to manually write log file when tranform xslt by using Transformer?

    I want to ask experts that are there any way to write the information(such as template name or number of template used) into log file while performing transformation with javax.xml.transform.Transformer. Below is my sample code import javax.xml.trans

  • Populating a ComboBox with names of all Cue Points

    I'm working with Flash CS4 and ActionScript 3.  I have a .flv file with about 30 cue points created in Soundbooth.  When I run my video my listener  picks up the cue points as expected.  What I am trying to do now is populate a combobox with a list o

  • Seeking a clear answer...

    Hi, I have a new Extreme (n) base station, but am running on a 12' PB G4. I have my external HD set up and am able to access it wirelessly. My problem is, I want to watch the movies I have on my hard drive, and it seems the data transfer is too slow