US and Worldwide: +1 (866) 660-7555
Results 1 to 4 of 4

Thread: Mondrian Query

  1. #1

    Default Mondrian Query

    Hi Team,

    Please have a look at the query which gives me the output as below

    with member [Measures].[] as '([Measures].[Dollar Amount] / 1000)', FORMAT_STRING = "$ #,##,##,### K"
    member [Measures].[latitude] as '[Origin Country].[Region].CurrentMember.Properties("latitude")', FORMAT_STRING = "######.#####"
    member [Measures].[longitude] as '[Origin Country].[Region].CurrentMember.Properties("longitude")', FORMAT_STRING = "######.#####"
    select {[Measures].[latitude], [Measures].[longitude], [Measures].[]} ON COLUMNS,
    Filter({[Origin Country].[N America].children}, ([Measures].[] > 0)) ON ROWS
    from [Anciliary Service Cube]
    where Crossjoin({[Destination Country].[999]}, {[Time].[2013]})
    [Measures].[latitude] [Measures].[longitude] [Measures].[]
    [Origin Country].[N America].[Canada] 56. -97. $ 94 K
    [Origin Country].[N America].[USA] 37. -93. $ 2394 K


    thought the result is as expected but i have a small problem in displaying the result in UI. The problem is when i tried to display the result using a js i am getting the result as Origin Country,N America,Canada,56.,-97.$ 94 K but i dont want the region name i.e N America coming in the result.Reason is that i am using a common js where i have fixed the index to read the respective column but now region name coming along with the country is causing
    a problem as it is pushing the country to the next index.

    I want something to look like this

    Origin Country,Canada,56.,-97.$ 94 K

  2. #2
    Join Date
    Nov 2008
    Posts
    722

    Default

    Have you tried creating another hierarchy in the [Origin Country] dimension without the region name?
    pdi-ce-4.4.0-stable
    Java 1.7 (64 bit)
    MySQL 5.6 (64 bit)
    Windows 7 (64 bit)

  3. #3

    Default

    Quote Originally Posted by darrell.nelson View Post
    Have you tried creating another hierarchy in the [Origin Country] dimension without the region name?

    Is there any other way of doing the same beacuse if i change the hierarchy i have to make lots of changes in the application.So thats not affordable to me .Please suggest me some other possibility.

  4. #4
    Join Date
    Nov 2008
    Posts
    722

    Default

    Quote Originally Posted by savan_alm View Post
    ...if i change the hierarchy i have to make lots of changes in the application.
    Would you really have to make a lot of changes? The first hierarchy will be the default hierarchy. The second hierarchy would be used only if you explicitly specify it.
    pdi-ce-4.4.0-stable
    Java 1.7 (64 bit)
    MySQL 5.6 (64 bit)
    Windows 7 (64 bit)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •