How to union results from 3 different dimensions in where clause with or - Mdx query

Hi 
I have a MDX Query and i need to pass the variable values to it by dynamically.
Each time it will get any one attribute from three dimensions.
Select 
{} ON Columns,
{} ON Rows 
From
Cube
Where
[Dimension1].[Attribut].&[Value]
or
[Dimension2].[Attribut2].&[Value]
or
[Dimension3].[Attribut3].&[Value]
So It is working for two different values by using union and cross join.
Can you please provide the solution ..
Thanks in advance

Hi Philip
Thanks for replying me.
I tried on that way, In my mdx query i am using one slice attribute (i.e [Customer].[Gender].allmembers) in rows so getting error "The  Hierarchy already appears in Axis1".
SELECT
{[Measures].[Internet Sales Amount] } ON 0,
NON EMPTY
{[Customer].[Gender].allmembers } ON 1 -- Used
FROM
[Adventure Works]
WHERE
[Customer].[Gender].&[M]
,[Product].[Size Range].[(All)]
,[Customer].[Country].[All Customers]
[Customer].[Gender].[All Customers]
,[Product].[Size Range].&[XL]
,[Customer].[Country].[All Customers]
[Customer].[Gender].[All Customers]
,[Product].[Size Range].[(All)]
,[Customer].[Country].&[Australia]
Can you provide alternate ways to get resolved.
Thanks in advance

Similar Messages

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • How to filter results from 4 dynamic list menus depandant on how many of them are selected

    I have a search page with a form with 4 list menus and 1 submit that post the results to the results page. I can create a record set that either retrieves the correct data from my database if a selection is made from all four menus Or i can create the recordset if only 3 menus have a selection or the same for 2 menus and 1 menu. However i want the user to be able to make a selection from either 1, 2, 3 or all 4 of the menus and the exact data be retrieved. At present if i try to combine the recordset using AND and ORs the results are not specific enough, for example the 4 menus are Location, Type, Price & Style if a user selects from all 4 i only want to retrieve data that matches all 4 criteria, but at the same time if the user selects only 2 of the menus the i want it to retrieve data that matches specifically those 2 variables. I´m not actually sure if i should be creating a more advanced sql query of if its the php side of things that i need to look at. This is my first dynamic site so please be aware i´m still a learner where php and sql is concerned. Please can anyone help?  

    Hey there,
    Thanks for replying,
    I too am using Dreamweaver recordset, my local server is XAMPP ( apache php mysql), i´have pasted my sql recordset below to give an idea of what i´m trying to do, however this does not work as i´m trying to select the exact data based on 4 menus PRICE TYPE LOCATION and BEDS, and also want the search to work if the user only selects options from either 1, 2, 3 or 4 of the menus, with the code as it is if the user select only two options from 2 of the menus the results don´t just find (for example) all results for location AND price they find all results for the location varibale OR the price variable rather than a match for both, if you see what i mean?
    Any suggestions?  
    SELECT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number`
    FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid
    WHERE (location=varloc AND price = varprice AND type=vartype AND beds=varbed ) OR (price=varprice AND location=varloc AND type=vartype) OR  (price=varprice AND location=varloc AND beds=varbed) OR (price=varprice AND beds=varbed AND type=vartype) OR  ( location=varloc AND type=vartype AND beds=varbed) OR  (price=varprice AND location=varloc) OR (price=varprice AND type=vartype) OR (price=varprice AND beds=varbed) OR (type=vartype AND location=varloc) OR (type=vartype AND beds=beds) OR (location=varloc AND beds=varbed) OR (price = varprice OR beds=varbed OR type=vartype OR location=varloc)
    ORDER BY detailstable.trueprice ASC
    Look forward to receiving your thoughts,
    Linda
    Date: Wed, 21 Oct 2009 14:36:33 -0600
    From: [email protected]
    To: [email protected]
    Subject: how to filter results from 4 dynamic list menus depandant on how many of them are selected
    Hiya,
    I'm just doing my first dynamic site too, and am at a similar level to yourself.
    Can you give us more info re the site. What software, eg Dreamweaver etc are you using, and is your server using PHP or ASP etc?
    For what I've used, I amended the SQL side of things in the recordset in Dreamweaver. That way, you can test the SQL as you're setting up the recordset.
    Let me know how you're going on anyway
    Cheers
    Andy
    >

  • How to join  fields from different internal tables and display into one int

    hai i have one doubt...
    how to join  fields from different internal tables and display into one internal table..
    if anybody know the ans for this qus tell me......

    hii
    you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
    SELECT bwkey                         " Valuation Area
             bukrs                         " Company Code
        FROM t001k
        INTO TABLE i_t001k
       WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT bwkey                       " Valuation Area
               werks                       " Plant
          FROM t001w
          INTO TABLE i_t001w
           FOR ALL ENTRIES IN i_t001k
         WHERE bwkey = i_t001k-bwkey
           AND werks IN s_werks.
        IF sy-subrc EQ 0.
          LOOP AT i_output INTO wa_output.
            READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
            READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
            wa_output-bukrs = wa_t001k-bukrs.
            MODIFY i_output FROM wa_output.
            CLEAR wa_output.
          ENDLOOP.                         " LOOP AT i_output
        ENDIF.                             " IF sy-subrc EQ 0
    regards
    twinkal

  • How to transfer photo from iphone 4s to my computer with the same quality?

    How to transfer photo from iphone 4s to my computer with win7 OS. Yes I know how to get it done, the problem is I don't get the same quality of the photo in my computer just like photo with chrome, process, transfer and et al... How could I do that? BTW I use itunes and syncios but still I get different quality.

    I have the same need, I always  copy my batch of photos from iPhone 5 to computer for backup. My friend share a transfer app for me, works well. She got the tips from Transfer Photos from iPhone to Computer (Mac/Windows 7/8)

  • I have an airport express and want to know how to set up two different wireless networks. One with 5GHZ and one with 2.4GHZ so different devices can connect to either.

    I have an airport express and want to know how to set up two different wireless networks. One with 5GHZ and one with 2.4GHZ so different devices can connect to either. I have an iphone 4 that will not connect to 5ghz.
    thank you!

    Your AirPort Express is already providing two separate 2.4 GHz and 5 GHz bands, but each band is using the same wireless network name.
    This is the default setup for the AirPort Express, which is recommended for most users. The theory here is that devices will automatically connect to the best quality signal based on their capabilities and distance in relation to the AirPort Express.
    It is possible to assign a different name to the 5 GHz band, and then "point" devices at that network to connect. Some users swear by this option.....(I am not one of them).... but you might want to give it a try to see how it works for you.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the AirPort Express
    Click Edit in the smaller window that appears
    Click the Wireless tab at the top of the next window
    Click Wireless Options near the bottom of the next window
    Enter a check mark next to 5 GHz Name.....which will automatically add "5 GHz" to the network name....so you can identify it
    Click Save, then click Update and wait a full minute for the Express to restart
    Now you will need to "point" your 5 GHz capable devices at the 5 GHz network name.  2.4 GHz devices will connect to your "other" network name.

  • How do I change from sync to iTunes to sync with iCloud if I don't have my computer available to plug into itubes

    How do I change from sync to iTunes to sync with iCloud if I don't have my computer available to plug into itubes

    Hello Rsd841979,
    Thanks for using Apple Support Communities.
    It's not very clear to me what you're trying to accomplish with iCloud, but if you want to start backing up to iCloud, then you can follow the directions in the article below.  If this is not what you are trying to do, then please let me know what you're wanting to use iCloud with.
    iCloud: Back up your iOS device to iCloud
    Take care,
    Alex H.

  • How to transfer pictures from computer ( Windows 7) to iPad with Retina display ?

    How to transfer pictures from computer ( Windows 7) to iPad with Retina display ?

    Note that, if you use iTunes to sync photos onto the iPad, you'll need to use iTunes to take them off.
    if you don't have a lot and want to keep deletability, you may want to consider mailing them to yourself, or uploading them to something like dropbox, then downloading them (via the dropbox app) to your iPad.
    there are also several photo syncing apps out there that may suit your needs. Afraid I don't have any to recommend. But syncing via iTunes isn't the only way to get photos onto your iPad..it's just the  built in way

  • How to download data from abap-ouput to excel sheet with logo

    how to download data from abap-ouput to excel sheet with standard logo
    Edited by: Harish Kasyap on Nov 18, 2008 8:19 AM
    Edited by: Harish Kasyap on Nov 18, 2008 8:20 AM

    For saving the report you can goto System -> List -> Save -> Local File -> Location where you want to save in your presentation server.
    You can also give a option in your selection screen to save the file to Presentation server using FM GUI_DOWNLOAD.
    Hope it helps.
    Thanks,
    Jayant.

  • How do I modify the WHERE clause in my SQL query?

    This seems like such a straight-forward part of the report design, but I'm fairly new to Crystal Reports and I only have experience with modifying reports someone else has already written.  In this particular case, I just need to modify the WHERE clause of the SQL query.  I can select Show SQL Query and see what statement is being used to select data, but I can't find where to modify it since it's grayed out.  I see how to change the selection criteria, parameters, grouping, etc...just not the WHERE clause.  The report is linked to a database used for reporting with a table created and populated by a stored procedure.  I don't need to modify the stored procedure because the data I want to filter by is currently in the table--I just don't know how to filter by what I need.  Here's part of the query:
    SELECT "rpt_dist"."startdate", "rpt_dist"."transtype", "rpt_dist"."laborcode", "rpt_dist"."crewid", "rpt_dist"."regularhrs" FROM   "Reporting"."dbo"."rpt_dist" "rpt_dist"
    WHERE  (rpt_dist."transtype" <> 'WORK' AND rpt_dist."transtype" <> 'WMATL') AND rpt_dist."laborcode" LIKE 'S%' AND (rpt_dist."crewid" = 'HOUS' OR rpt_dist."crewid" = 'HOUS2' ...
    I would like to add another crewid to the WHERE clause.  Thanks for any input.

    1.Open the report in the crystal designer
    2.Go to the field explorer(if hidden go to view menu->field explorer)
    3.Rt. click on the database fields->choose database expert
    4.Now you will see 2 columns-Available DataSource  and Selected Tables
    5.Rt. click on the object(ex.command) available in the Selected Tables column->Choose Edit command
    6.A new Modify Command window will appear,here you can edit your SQL Query
    I get to step 4 and I see the two columns including my database and the report table, but there is no command object available.  If I right-click on my table, I can just view the Properties. ??
    As for the other tip to modify the record selection:  I don't see anywhere the other crewid values are set and if I add the one I'm missing, it doesn't modify the existing SQL Query and when I preview the report it throws off the results so that no data displays??
    I'm using Crystal Reports 11.5 if that makes a difference.  Thanks again.

  • How can I pass multiple condition in where clause with the join table?

    Hi:
    I need to collect several inputs at run time, and query the record according to the input.
    How can I pass multiple conditions in where clause with the join table?
    Thanks in advance for any help.
    Regards,
    TD

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • How to dynamically update columns in a where clause to a SQL query in OSB?

    Hi Gurus,
    I have a requirement where in we need to dynamically update a where clause to a SQL query in OSB(11.1.1.6.0).
    For example:
    If the JCA sql string is "select * from emp where emp_id = 100 and emp_status ='Permanent'" now i want to change this where clause and the new query has to be like "select * from emp where emp_name like 'S%' and emp_dept like 'IT' ". basically we need to change the where clause dynamically.
    We can also use "fn-bea:execute-sql()" in a xquery but I don't want to use this function as creates a new connection.
    I have done some home work and found out --> as per the DOC "http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/jca.htm#OSBDV943" section: "25.5.2 JCA Transport Configuration for Proxy and Business Services", when a business service is created by using JCA, we can see Interaction Spec Properties under JCA Transport Tab. This will have a property "SqlString' and we can over ride it. But I am unable to figure out how to over ride the value. I have tried by using Transport Headers activity but no luck. Please guide me how to achieve this?
    Thanks in advance
    Surya

    I solved my problem.
    In my header renderer, I simply added a line to set the text to the object value "label.setText( (String) value );" (where label is an instance of a JLabel.
    Thank you to who took some time to think about it.
    Marc

  • Stored Value from different Dimension

    <p>Hi, I am new to Hyperion Essbase and need some help from a kindsoul here.</p><p>My cube is as follows</p><p>- Measure</p><p>  - Variable Cost</p><p>  - Fixed Cost</p><p>- Division</p><p>  - SCN TOTAL</p><p>     - SCN R&D Div</p><p> </p><p>Variable Cost and Fixed Cost are Child of Measure and SCNR&D Div is child of SCN TOTAL and SCN TOTAL is Child ofDivision. I use Excel to get data from SCNTOTAL or SCN R&D Div, eg</p><p>                              SCNTOTAL                                     SCNR&D Div</p><p>Fixed Cost          34                        FixedCost          30</p><p>Variable Cost     45                         VariableCost     40</p><p> </p><p>But now I have a concern. I wish to store data from SCN R&D Div to Variable Cost so I think I need a formula to do </p><p>this but how?  i.e I need to store data from SCN R&D Div (different dimension) to Variable Costso when I use excel to get data from SCN TOTAL, I still able to getSCN R&D Div for Variable Cost.</p><p>                                SCNTOTAL</p><p> Fixed Cost          34                       </p><p>Variable Cost     40          </p><p> </p><p>Thank you.              </p>

    <p>Hi Hutchia, thanks a lot for your reply. I give you a moredetailed of my cube structure.</p><p>-Measure</p><p>  - Miscellaneous Cost (+)</p><p>  <b>- Variable Cost (~)</b></p><p>     <b>- Utilities Cost (+)</b></p><p><b>     - Misc Cost-R&D Div(+)</b></p><p><b>  - Fixed Cost (~)</b></p><p> </p><p>- Division</p><p>  - SCN TOTAL</p><p>     - SCN R&D Div  ("SCN R&D Div 1" + "SCN R&D Div2")</p><p>     - SCN R&D Div 1</p><p>     - SCN R&D Div 2</p><p> </p><p>Miscellaneous Cost, Variable Cost and Fixed Cost are Childs ofMeasure. Variable Cost and Fixed Cost are newly added. UtilitiesCost and Misc Cost-R&D Div are Childs of Variable Cost</p><p> </p><p>In Division dimension, SCN TOTAL is Child of Division and SCNR&D Div is Child of SCN TOTAL.</p><p> </p><p>So when my users do a spreadsheet (Lock & Send) method, theywill use this spreadsheet below</p><p> </p><p>                                        <b>SCN R&D Div 1   SCN R&D Div 2</b></p><p><b>Miscellaneous Cost    30                          20</b></p><p> </p><p>If user do a spreadsheet display of the Database, it willshow</p><p>                                        <b>SCN TOTAL</b></p><p><b>Miscellaneous Cost    50                    </b></p><p> </p><p><b>or </b></p><p> </p><p><b>SCN R&D Div       Miscellaneous Cost      50</b></p><p><b>SCN R&D Div 1   Miscellaneous Cost      30 </b></p><p><b>SCN R&D Div 2  Miscellaneous Cost      </b> <b>20</b></p><p> </p><p>So now I need to add in 2 user information, Variable/Fixed Costaccording to my user request. There were some formulas including toget the desired results. Users wants the below report</p><p>                                        <b>SCN TOTAL</b></p><p><b>Variable Cost          </b>   <b>100</b></p><p><b>Fixed Cost</b>                   <b>50</b></p><p> </p><p><i>Problem: In the Variable Cost, Child, Utilities Cost is toget from SCN TOTAL and only Misc Income-R&D Div is to get fromSCN R&D Div which will add up SCN R&D Div 1 and SCN R&DDiv 2 for Miscellaneous Cost ONLY.</i></p><p> </p><p>Sorry to trouble you but I really can't think of a way out.</p><p>I was thinking of using Calculation Script after loading updata, calculate the value from Miscellaneous Cost which sums up SCNR&D Div1 and SCN R&D Div 2 and pass to Misc Cost-R&DDiv but how should I do that?</p>

  • OBIEE Group By on 2 facts and concatenated columns from different dimensions

    Hi
    I have a different kind of problem involving 2 fact tables with different dimensional attributes.
    Fact 1 has Dim Attributes ( Cust,Facility )
    Measure - Gross Amount
    Fact2 has Dim attributes (Cust,Facility and Risk Group )
    Measure : Exposure Amount
    Since we have 2 facts with different dimensions,
    to exclude the 'Risk Group' dimension column from the group by for the Fact1,
    we set the 'Gross Amount' measure to total level (Risk Group Dimension ) in contents tab.
    So the values from both the fact tables appears in the same report correctly.
    But in the same report we have another requirement where the rating column from the customer dimension has to be concatenated with the ratings column in the facility dimension.
    We have to concatenate customer.rating with the facility.rating and display it in the report.
    when we just pull the individual columns from the dimensions into the report it works fine.
    But when we try to concatenate the 2 columns and show it in the report,
    the concatenated column does not appear in the select or the group by in the SQL Fact2.( Generated by OBIEE )
    The other fact1 has the concatenated column in the select as well as the group by clause ( Generated by OBIEE )
    As a result the report shows the concatenated values only for the results from the Fact1. But the results from Fact2 does not have the concatenated column values.
    The report should look like the below:
    Custor.Name,     Customer.Id,     Facility.Name,     Facility.Id,     Customer.Rating/Facility.Rating,     Risk Group,     Gross Amount,     Exposure Amount
    ===========    =========      ===========     =========   ========================      =========     ===========     ===============
    JPMC                123                    GROSS               123               08/10                                                  LNL                    45,000               25,000
    CLAIRE               456                    NET                    456               07/10                                                  RNK                    50,000               30,000
    Thanks,
    Chandra

    As suggested you really want to move your none-aggregated fact attributes to a logical dimension (using the same physical table as the logical fact). Map this in the BMM layer as a snowflake, Place a hierarchy on this dimension with (at minimum) Total -> Detail levels, then on the other fact table you want to include in the report, set the content level on your other fact measures to the 'Total' level for your new logical Dim and it will allow them to be present in the same report.

  • How to use Results from Another Query for SAP BW universes

    Hi Everyone,
    I have two SAP BI universes.In my First universe I have Sales Doc no (dimension) and Orderqty (Measure) and in my second universe I have Sales Doc no(Dimension) and BillQty (Measure).
    Here in my first dataprovider I have 1200 rows of data and in second dataprovider I have 75,000 rows. The report should fetch only the BillQty details that matches to corresponding  Sales doc no in first data provider.
    I want to place all these fileds into a single report like as shown.
    (Datarpovider1)                (Datarpovider1)                    (Datarpovider2)
    *Sales Doc No*               Orderqty                           BillQty
    Here I am able to generate single report using merge dimension but it is leading to performance issues. I want to restrict the values at query level by passing the First dataprovider Sales doc no to second Data provider Sales doc number using Results from Anothery Query feature so that It can fetch only the matching records.
    I tried it but it was giving the follwing error:
    A filter contains a wrong value. You cannot run this query. (Error: WIS 00007)
    How Can I get rid of this error. Can we use Results from Anothery Query option for OLAP universe. Are there any limitation on it.
    All this I am doing in Webi Rich Client.
    Appreciate your help
    Thanks &in Advance
    Kiran Saka

    Hi Kiran,
    I think the filter has a wrong operand. For example, a filter with an empty constant, or a filter that deals with numeric values is defined with an alphanumeric value.Check out for this.
    Regards,
    Neeraj

Maybe you are looking for