Querying last element in a dimension based on another level in the same dimension using MDX
Summary: I need to write an MDX that returns the last date available in the level in the date dimension based for each month in the same dimension.
Details: i have the a dimension which has the following levels.
Dim_Date : Date (key) , Month (name of month), Quarter, Year.
The query i m trying to come up with would return the result something like
Month || Max_date || measure1
Jan 2014-01-25 100
Feb 2014-02-28 200
Please let me know if the above makes sense. Basically i m trying to get the max date for each month.
Thanks
Sri
Hi SrikanthGS,
Assuming that with the last date available for the measure you mean the last date with non-empty figures, consider the following against the AW:
SELECT [Measures].[Internet Sales Amount] ON 0,
Generate (
[Date].[Calendar].[Month].Members,
( Exists ( [Date].[Month of Year].[Month of Year], [Date].[Calendar].CurrentMember ),
Tail (
NonEmpty (
Descendants ( [Date].[Calendar].CurrentMember, [Date].[Calendar].[Date] ),
[Measures].[Internet Sales Amount]
1
) ON 1
FROM [Adventure Works]
WHERE [Product].[Product Categories].[Subcategory].&[1]
Philip,
Similar Messages
-
Radio group in classic report based on another column on the same row.
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
Application Express 4.1.0.00.32
How can I have a radio group column based on an LOV utilizing another column on the same row of the report?
For example: what if I had a survey application and depending on the likert scale that was assigned to the question there would be different possible answer choices:
Question 1 on row 1 of the report: The class instructor was friendly?
Likert scale choice is Agreement.
Choices on Radio Group: Strongly Agree, Agree, Undecided, Strongly Disagree
Question 2 on row 2 of the report: The class offered good materials?
Likert scale choice is Quality.
Choices on Radio Group: Excellent, Below Average, Average, Above Average, Excellent
The radio group can change per row depending on the Likert scale assigned to the question which is assigned to a different column on the row.
Can LOV utilize the column? :
SELECT scale_text
FROM scale_choices
WHERE scale_category_choice_id = 2 <<= this would be the Likert scale identifier
ORDER
BY display_orderHere is the answer:
APEX_ITEM.SELECT_LIST_FROM_QUERY(
p_idx IN NUMBER,
p_value IN VARCHAR2 DEFAULT NULL,
p_query IN VARCHAR2,
p_attributes IN VARCHAR2 DEFAULT NULL,
p_show_null IN VARCHAR2 DEFAULT 'YES',
p_null_value IN VARCHAR2 DEFAULT '%NULL%',
p_null_text IN VARCHAR2 DEFAULT '%',
p_item_id IN VARCHAR2 DEFAULT NULL,
p_item_label IN VARCHAR2 DEFAULT NULL,
p_show_extra IN VARCHAR2 DEFAULT 'YES')
RETURN VARCHAR2; -
Using different levels of the same dimension
If I have 2 fact tables and a conforming time dimension. Can I make a join so that one table will ignore different years completely? (1 table has only 1 year of data, so it should display same values for different years for other table -yet, I still want to be able to drill-down from Year-to-Detail). I am somewhat successful at seeing it ok on a Annual level (when setting the desired metric to Grand Total Level - but aggregate navigation doesn't work correctly -I'm locked at annual level). Thanks
HI mma (and anyone else who was following).
Here's an update:
a) AGO function doesn't support anything non-integer - it's official and the product enhancement request has been filled. Go figure - they cancel time-series wizard - but at the same time - the AGO isn't fully scalable. Since we're developing a brand-new RPD - and we weren't using any YAGO, MAGO, etc. tables - this has bitten us later than sooner.
b) using CASE statement is no panacea (change for each year).
c) your method (time.key=time.key (of 2005) + MOD (time,key, 365) would probably work in my situation (I tried it - and it wasn't that difficult to implement), UNLESS I'd get the following RPD integrity error - "Error: Using a complex join in table that sources time dimension" (I tried aliases as well).
d) Right now, I'm just doing that metric on Annual level. Creating a view in Oracle that only contains needed data (for 2006) , using it as a physical table in physical layer, and connecting with all foreign keys BUT time.
I still think there must be a better way without complex ETL and without creating additional column. LOJ and ROJ and FOJ didn't work.
Thanks for looking at this again. -
Populate a table field based on another field in the same table
Hi,
I have a table with fields collection profile and collection prfile text. When maintaining this table, the collection profile name should appear automatically ( from table UDM_COLL_GRPT) based on the collection profile entered.. In UDM_COLL_GRPT, collection profilr name is not a primary key. Please let me know how to do this.
Thanks in advance,
JissaGuess you could make use of the event 05 from the TMG events to make the appropriate selections and populate the field.
Vikranth -
Count Distinct based on another column in the same table
Hello,
My question in short: is is it possible to add a new column to a view which holds the DISTINCT COUNTS of values/domains of another column in the same view?
For example, in the below table the column "Distinct Count of Occurence" shows how many distinct values a person has in the Occurence column. So AAA has 1 and 2 therefore it is 2 distinct values etc.
My issues is that I can retrieve unique values bu Count (Select Occurence)but I can not add the new column that would add the records to the corresponding Persons in the above table.
Is there an easy way to achieve this on the DWH level or should it be done with MDX in the cube?
ThanksHi,
Below a solution to use the view by adding a column with window functioning, maybe this will help.
CREATE TABLE #TMP
PERSON VARCHAR(10),
OCCURENCE SMALLINT
--DROP TABLE #TMP
INSERT INTO #TMP(PERSON,OCCURENCE)
VALUES
('AAA','1'),
('AAA','2'),
('BBB','1'),
('BBB','1'),
('BBB','1'),
('CCC','1'),
('CCC','2'),
('CCC','3');
--TRUNCATE TABLE #TMP
WITH CTE
AS
SELECT PERSON
,OCCURENCE
,ROW_NUMBER() OVER(PARTITION BY PERSON ORDER BY OCCURENCE) AS RN
FROM #TMP
SELECT PERSON, MAX(RN) AS RN
FROM CTE
GROUP BY PERSON
Regards,
Reshma
Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered -
Multiple columns from the same dimension table as row labels performing slowly
(Working with SSAS tabular)
I'm trying to figure out what the approach should be for the following scenario:
Lets say we have a Customer table. The table has columns such as account number, department number, name, salesperson, account manager, number of customers, delivery route, etc
A user of the model could want to see any permutation of that information as the row labels. How should that be handled?
What we've been doing so far is that the user adds each column they want into the "ROWS" section in Excel. This works fine with smaller tables (for example, "Department" table with a "Department Code" and "Department Name",
but on large tables this quickly chokes. I understand why this is happening, I just haven't found a better way to accomplish the same thing.
I can add a calculated column to the model through VS, but obviously this is unsupportable and unscalable when each person needs their own permutations of the data. Can something similar be done in Excel?
This question seems to be what I need:
http://social.msdn.microsoft.com/Forums/en-US/97d1157a-1402-4227-b96a-79524401ddcd/mdx-query-performance-when-selecting-multiple-attributes-from-same-dimension?forum=sqlanalysisservices
However I can't find any information on how to add those properties (is it a multidimensional-only thing?)Thanks for the help. Sorry but i'm a self-taught developer, and i may be missing some basics :)
Anyway i've done what you suggested but i get this error:
[nQSError: 15011]The dimension table source Dimension Services.DM_D_SERVIZI_SRV has an aggregate content specification that specifies the level Product. But the source mapping contains column COD_PRODUCT with a functional dependency association on a more detailed level .
where:
- DM_D_SERVIZI_SRV is the physical alias for the Service Dimension (and the name of the LTS too)
- COD_PRODUCT is the leaf of the hierarchy, the physical primary key, but it hasnt to be included in the hierarchy
Do i have to add another level with the primary key and hide it to the users?
I tried to solve this going to the logical tables source properties, on the tab contents, setting "logical level" to null for the hierarchy, but i don't know if this is correct.
Thanks -
Why is the Star Transformation using two indexes for the same dimension?
Hi,
Recently, I have made an investigation about the Star Transformation feature. I have found a strange test case, which plays an important role in my strategy for our overall DWH architecture. Here it is:
The Strategy:
I would like to have the classical Star Transformation approach (single column Bitmap Indexes for each dimension foreign key column in the fact table), together with additional Bitmap Join Indexes for some of the dimension attributes, which would benefit from the materialization of the join (bitmap merge operation will be skipped/optimized).
The query:
select dp.brand, ds. region_name, dc.region_name
, count(*), sum(f.extended_price)
from fact_line_item f
, dim_part dp
, dim_supplier ds
, dim_customer dc
where dp.mfgr = 10 -- dimension selectivity = 1/10 --> acttual/fact selectivity = 6/10
and f.part_dk = dp.dk
and ds.region_name = 'REGION #1' -- dimension selectivity = 1/9
and f.supplier_dk = ds.dk
and dc.region_name = 'REGION #1' -- dimension selectivity = 1/11
and f.customer_dk = dc.dk
group by dp.brand, ds. region_name, dc.region_name
The actual plan:
| Id | Operation | Name | Starts | E-Rows | Cost (%CPU)| A-Rows | A-Time | Buffers | Reads |
| 0 | SELECT STATEMENT | | 1 | | 3247 (100)| 1 |00:01:42.05 | 264K| 220K|
| 1 | HASH GROUP BY | | 1 | 2 | 3247 (1)| 1 |00:01:42.05 | 264K| 220K|
|* 2 | HASH JOIN | | 1 | 33242 | 3037 (1)| 217K|00:01:29.67 | 264K| 220K|
|* 3 | TABLE ACCESS FULL | DIM_SUPPLIER | 1 | 1112 | 102 (0)| 1112 |00:00:00.01 | 316 | 4 |
|* 4 | HASH JOIN | | 1 | 33245 | 2934 (1)| 217K|00:01:29.10 | 264K| 220K|
|* 5 | TABLE ACCESS FULL | DIM_CUSTOMER | 1 | 910 | 102 (0)| 910 |00:00:00.08 | 316 | 8 |
|* 6 | HASH JOIN | | 1 | 33248 | 2831 (1)| 217K|00:01:28.57 | 264K| 220K|
|* 7 | TABLE ACCESS FULL | DIM_PART | 1 | 10 | 3 (0)| 10 |00:00:00.01 | 6 | 0 |
| 8 | PARTITION RANGE ALL | | 1 | 36211 | 2827 (1)| 217K|00:01:28.01 | 264K| 220K|
| 9 | TABLE ACCESS BY LOCAL INDEX ROWID| FACT_LINE_ITEM | 6 | 36211 | 2827 (1)| 217K|00:01:33.85 | 264K| 220K|
| 10 | BITMAP CONVERSION TO ROWIDS | | 6 | | | 217K|00:00:07.09 | 46980 | 3292 |
| 11 | BITMAP AND | | 6 | | | 69 |00:00:08.33 | 46980 | 3292 |
| 12 | BITMAP MERGE | | 6 | | | 193 |00:00:02.09 | 2408 | 1795 |
| 13 | BITMAP KEY ITERATION | | 6 | | | 4330 |00:00:04.66 | 2408 | 1795 |
| 14 | BUFFER SORT | | 6 | | | 60 |00:00:00.01 | 6 | 0 |
|* 15 | TABLE ACCESS FULL | DIM_PART | 1 | 10 | 3 (0)| 10 |00:00:00.01 | 6 | 0 |
|* 16 | BITMAP INDEX RANGE SCAN | FACT_LI__P_PART_DIM_KEY_BIX | 60 | | | 4330 |00:00:02.11 | 2402 | 1795 |
|* 17 | BITMAP INDEX SINGLE VALUE | FACT_LI__P_PART_MFGR_BJX | 6 | | | 1747 |00:00:06.65 | 890 | 888 |
| 18 | BITMAP MERGE | | 6 | | | 169 |00:00:02.78 | 16695 | 237 |
| 19 | BITMAP KEY ITERATION | | 6 | | | 5460 |00:00:01.56 | 16695 | 237 |
| 20 | BUFFER SORT | | 6 | | | 5460 |00:00:00.02 | 316 | 0 |
|* 21 | TABLE ACCESS FULL | DIM_CUSTOMER | 1 | 910 | 102 (0)| 910 |00:00:00.01 | 316 | 0 |
|* 22 | BITMAP INDEX RANGE SCAN | FACT_LI__P_CUST_DIM_KEY_BIX | 5460 | | | 5460 |00:00:02.07 | 16379 | 237 |
| 23 | BITMAP MERGE | | 6 | | | 170 |00:00:03.65 | 26987 | 372 |
| 24 | BITMAP KEY ITERATION | | 6 | | | 6672 |00:00:02.23 | 26987 | 372 |
| 25 | BUFFER SORT | | 6 | | | 6672 |00:00:00.01 | 316 | 0 |
|* 26 | TABLE ACCESS FULL | DIM_SUPPLIER | 1 | 1112 | 102 (0)| 1112 |00:00:00.01 | 316 | 0 |
|* 27 | BITMAP INDEX RANGE SCAN | FACT_LI__S_SUPP_DIM_KEY_BIX | 6672 | | | 6672 |00:00:02.74 | 26671 | 372 |
The Question:
Why is the Star Transformation using both indexes FACT_LI__P_PART_DIM_KEY_BIX and FACT_LI__P_PART_MFGR_BJX for the same dimension criteria (dp.mfgr = 10)?? The introduction of the additional Bitmap Join Index actually make Oracle to do the work twice !!!
Anybody, any idea ?!?Dom, here it is the plan with the predicates:
| Id | Operation | Name | Starts | E-Rows | Cost (%CPU)| A-Rows | A-Time | Buffers | Reads |
| 0 | SELECT STATEMENT | | 1 | | 3638 (100)| 1 |00:06:41.17 | 445K| 236K|
| 1 | HASH GROUP BY | | 1 | 2 | 3638 (1)| 1 |00:06:41.17 | 445K| 236K|
|* 2 | HASH JOIN | | 1 | 33242 | 3429 (1)| 217K|00:08:18.02 | 445K| 236K|
|* 3 | TABLE ACCESS FULL | DIM_SUPPLIER | 1 | 1112 | 102 (0)| 1112 |00:00:00.03 | 319 | 313 |
|* 4 | HASH JOIN | | 1 | 33245 | 3326 (1)| 217K|00:08:17.47 | 445K| 236K|
|* 5 | TABLE ACCESS FULL | DIM_CUSTOMER | 1 | 910 | 102 (0)| 910 |00:00:00.01 | 319 | 313 |
|* 6 | HASH JOIN | | 1 | 33248 | 3223 (1)| 217K|00:08:16.63 | 445K| 236K|
|* 7 | TABLE ACCESS FULL | DIM_PART | 1 | 10 | 3 (0)| 10 |00:00:00.01 | 6 | 0 |
| 8 | PARTITION RANGE ALL | | 1 | 36211 | 3219 (1)| 217K|00:08:16.30 | 445K| 236K|
| 9 | TABLE ACCESS BY LOCAL INDEX ROWID| FACT_LINE_ITEM | 6 | 36211 | 3219 (1)| 217K|00:08:40.89 | 445K| 236K|
| 10 | BITMAP CONVERSION TO ROWIDS | | 6 | | | 217K|00:00:32.00 | 46919 | 19331 |
| 11 | BITMAP AND | | 6 | | | 69 |00:00:34.50 | 46919 | 19331 |
| 12 | BITMAP MERGE | | 6 | | | 193 |00:00:00.58 | 2353 | 1 |
| 13 | BITMAP KEY ITERATION | | 6 | | | 4330 |00:00:00.10 | 2353 | 1 |
| 14 | BUFFER SORT | | 6 | | | 60 |00:00:00.01 | 6 | 0 |
|* 15 | TABLE ACCESS FULL | DIM_PART | 1 | 10 | 3 (0)| 10 |00:00:00.01 | 6 | 0 |
|* 16 | BITMAP INDEX RANGE SCAN | FACT_LI__P_PART_DIM_KEY_BIX | 60 | | | 4330 |00:00:00.07 | 2347 | 1 |
|* 17 | BITMAP INDEX SINGLE VALUE | FACT_LI__P_PART_MFGR_BJX | 6 | | | 1747 |00:01:23.64 | 882 | 565 |
| 18 | BITMAP MERGE | | 6 | | | 169 |00:00:09.14 | 16697 | 7628 |
| 19 | BITMAP KEY ITERATION | | 6 | | | 5460 |00:00:02.19 | 16697 | 7628 |
| 20 | BUFFER SORT | | 6 | | | 5460 |00:00:00.01 | 316 | 0 |
|* 21 | TABLE ACCESS FULL | DIM_CUSTOMER | 1 | 910 | 102 (0)| 910 |00:00:00.01 | 316 | 0 |
|* 22 | BITMAP INDEX RANGE SCAN | FACT_LI__P_CUST_DIM_KEY_BIX | 5460 | | | 5460 |00:00:08.78 | 16381 | 7628 |
| 23 | BITMAP MERGE | | 6 | | | 170 |00:00:21.46 | 26987 | 11137 |
| 24 | BITMAP KEY ITERATION | | 6 | | | 6672 |00:00:10.29 | 26987 | 11137 |
| 25 | BUFFER SORT | | 6 | | | 6672 |00:00:00.01 | 316 | 0 |
|* 26 | TABLE ACCESS FULL | DIM_SUPPLIER | 1 | 1112 | 102 (0)| 1112 |00:00:00.01 | 316 | 0 |
|* 27 | BITMAP INDEX RANGE SCAN | FACT_LI__S_SUPP_DIM_KEY_BIX | 6672 | | | 6672 |00:00:20.94 | 26671 | 11137 |
Predicate Information (identified by operation id):
2 - access("F"."SUPPLIER_DK"="DS"."DK")
3 - filter("DS"."REGION_NAME"='REGION #1')
4 - access("F"."CUSTOMER_DK"="DC"."DK")
5 - filter("DC"."REGION_NAME"='REGION #1')
6 - access("F"."PART_DK"="DP"."DK")
7 - filter("DP"."MFGR"=10)
15 - filter("DP"."MFGR"=10)
16 - access("F"."PART_DK"="DP"."DK")
17 - access("F"."SYS_NC00017$"=10)
21 - filter("DC"."REGION_NAME"='REGION #1')
22 - access("F"."CUSTOMER_DK"="DC"."DK")
26 - filter("DS"."REGION_NAME"='REGION #1')
27 - access("F"."SUPPLIER_DK"="DS"."DK")
Note
- star transformation used for this statement -
Hello everyone,
I'm kind of newbie with MDX language, I'm trying to get filtered measures from a cube with a specific layout.
Here is my exemple :
I want to get all the "order numbers" where the "invoice" cost is more than 300. Each invoice is linked with an ID, one order number can have several invoices.
So what I do is a select request with 2 dimensions : "order num" and "id_invoice"
Here is the result : I get all the cost sorted by "order num" and I can easealy identify those who are above 300
order num
Id_invoice
cost
Total
Total2
15450307
10032013094498
1671
1737
ok
15450307
10032013099835
66
1737
KO
15450596
10032013094078
8524
8524
ok
15451214
10032013094119
228
4348
KO
15451214
10032013097069
978
4348
ok
15451214
10032013097071
3142
4348
ok
15542434
10032013101736
142
142
KO
15550064
10032013097016
1261
1261
ok
15550346
10032013097586
2252
2252
ok
15550353
10032013098446
2617
2617
ok
What i need : In "cost", I need to have the sum of each cost which are above 300 in one line (without showing the invoice id)
order num
cost
Total
Total2
15450307
1671
1737
ok
15450596
8524
8524
ok
15451214
4120
4348
ok
15550064
1261
1261
ok
15550346
2252
2252
ok
15550353
2617
2617
ok
How is it possible to use a filter on a dimension without showing it or merge 2 attributes of the same dimension ?
The problem is that if I show "id" column, the filter doesn't work properly : it compares 300 with the total cost of the whole order and does not compare with each invoice (which could be under 300 ! - see "KO" in Total2 column)
Here is the request I use to generate this result :
with
member [Measures].[Total]
as (
[TP].[ID INVOICE].[All],
[TP].[ORDER NUM].currentmember,
[Measures].[COST]
member [Measures].[Total2]
as (
IIF([Measures].[COST] >
300, "ok",
"KO")
select
{[Measures].[COST],[Measures].[Total],[Measures].[Total2]}
on
columns,
Filter
[TP].[ORDER NUM].[ORDER
NUM].members *
[TP].[ID INVOICE].[ID
INVOICE].members
,[Measures].[COST]
> 0
on
rows
FROM [MYCUBE]
Thank you for your help !
Kind regards,
Olivier.Hi Olivier,
hereunder a similar query against the AW. For all order numbers, we sum all lines above 30 without diplaying the line numbers:
WITH
MEMBER [Measures].[lines above 30] AS
IIF(
[Measures].[Internet Sales Amount] > 30,
[Measures].[Internet Sales Amount],
null
MEMBER [Measures].[aggr lines above 30] AS
SUM(
exists(
[Internet Sales Order Details].[Sales Order Line].[Sales Order Line],
[Internet Sales Order Details].[Sales Order Number].currentmember
[Measures].[lines above 30]
SELECT
[Measures].[Internet Sales Amount],
[Measures].[aggr lines above 30]
} ON 0,
[Internet Sales Order Details].[Sales Order Number].[Sales Order Number] ON 1
FROM ( SELECT
[Product].[Category].[All Products] ON 0,
[Internet Sales Order Details].[Sales Order Number].&[SO51177]:
[Internet Sales Order Details].[Sales Order Number].&[SO51178]
} ON 1
FROM [Adventure Works] )
I reduced the cube with a subselect.
Philip, -
Load scd 1 and scd 2 in the same dimension
Hi
is there any order for load of customer dimension, when you have in the same dimension fields scd1 and scd2. which one it is better load first, scd type 2 and then, scd type 1 for each customer with state = 1?
thankshi Mark,
but I have one field that I want maintain the historic and then, more some fields that I want to update, always that it's possible. both case, in the same (customer) dimension.
(the state it is for scd type 2, if state=0 inactive , if state=1 active)
thanks,
David
Actually that will part of same task itself in SSIS
If you're using standard SCD task in SSIS, it will take care of all these aspects by itself. You just need to identify the attributes as Type and Type2
If you're planning to use another method like say lookup, you need to add the logic in data flow to handle the type2 cases also in the required branch
See this as an example where I've used lookup based on hash values for applying SCD type 1 and type 2 logic
http://visakhm.blogspot.in/2014/06/ssis-tips-implementing-scd.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
[nQSError: 14065] Illegal cross join within the same dimension
Hey guys,
I'm stumped. I have two dimension tables that are joined 1:N (there is NOT an M:N relationship between them) and I have them joined in the Physical Layer and the Business Model and Mapping Layer. The two tables are F4101 (the "1") and F4102 (the "N") in the 1:N relationship. F4102 then joins to a fact table, and F4101 joins to NOTHING else. So I don't believe I have a circular condition or a need for a bridge table. Both tables are published to the Presentation Layer for reporting.
The error occurs in Answers when I want to do something as trivial as display the three primary key columns together from F4101: F4101.col1, F4101.col2, F4101.col3 (all three make up the PK). When I do that, the following error occurs:
"nQSError: 14065] Illegal cross join within the same dimension caused by incorrect subject area setup: [ F4101 T28761] with [ F4102 T1805] "
What I can't figure out is WHY the F4102 table is listed in this error. I didn't try to report on it at all. See the logical SQL below from my query:
"SQL Issued: SELECT "Item Master (F4101)".IMITM saw_0, "Item Master (F4101)".IMLITM saw_1, "Item Master (F4101)".IMAITM saw_2 FROM "Sales Analysis" ORDER BY saw_0, saw_1, saw_2"
As soon as I take out one of the three PK columns and add in another non-PK column from F4101, it works just fine. And reporting on each of the three PK columns individually works as well in Answers.
Any ideas? I would greatly appreciate it.
Thanks.Try this;
1. In the logical layer, create one folder called F4101_F4102.
2. Map both F4101 and F4102 as logical table sources in that folder.
3. Join from the folder F4101_F4102 to the fact using a Logical (new complex join) join.
Chris. -
Runtime prompts with the same dimension
Hello,
I'm setting up a business rule to contain two variables referring to members in the same dimension (for example, Account_VAR and Account_Basis_VAR both using Member of the Account dimension). I would like to have Account_VAR default as filled based on the selected member on the form (and hidden) and then have Account_Basis_VAR default to the same account as Account_VAR, but selectable based on which accounts the user has Read access to.
The calculation is working properly and the values are being distributed to the Account selected (Account_VAR) based on the current allocation to level 0 in the base account(Account_Basis_VAR), but I would like to hide Account_VAR while still prompting for Account_Basis_VAR. I've tried a few iterations of settings but both account prompts always appear in the runtime prompt window.
Is there a workaround for this?
NikThe strange thing is that the results from the queries are correct running them in SQL Developer. This is one that works:
SELECT Project.Project saw_0, "- SalesOrderFact"."Sales Amount" saw_1, "- PurchaseOrderFact"."Purchase Amount" saw_2, REPORT_SUM(saw_1 BY ), REPORT_SUM(saw_2 BY ) FROM SalesOrder ORDER BY saw_0
SALES ORDER:
select T3032.PROJECT_DESCRIPTION as c1,
sum(T161.SALES_AMOUNT_LOCAL) as c2
from
DIM_PROJECT_V T3032,
CUBE_SALES_ORDER T161
where ( T161.DIM_PROJECT = T3032.DIMENSION_KEY )
group by T3032.PROJECT_DESCRIPTION
order by c1
PURCHASE_ORDER:
select T3032.PROJECT_DESCRIPTION as c1,
sum(T3020.TOTAL_BUY_AMOUNT) as c2
from
DIM_PROJECT_V T3032,
CUBE_PURCH_ORDER T3020
where ( T3020.DIM_PROJECT = T3032.DIMENSION_KEY )
group by T3032.PROJECT_DESCRIPTION
order by c1
And this will give the wrong result in Answers (correct in SQL..):
SELECT Project."Project Id" saw_0, "- SalesOrderFact"."Sales Amount" saw_1, "- PurchaseOrderFact"."Purchase Amount" saw_2, REPORT_SUM(saw_1 BY ), REPORT_SUM(saw_2 BY ) FROM SalesOrder ORDER BY saw_0
SALES_ORDER:
select T3032.PROJECT_KEY_NAME_ID as c1,
sum(T161.SALES_AMOUNT_LOCAL) as c2
from
DIM_PROJECT_V T3032,
CUBE_SALES_ORDER T161
where ( T161.DIM_PROJECT = T3032.DIMENSION_KEY )
group by T3032.PROJECT_KEY_NAME_ID
order by c1
PURCHASE_ORDER:
select T3032.PROJECT_KEY_NAME_ID as c1,
sum(T3020.TOTAL_BUY_AMOUNT) as c2
from
DIM_PROJECT_V T3032,
CUBE_PURCH_ORDER T3020
where ( T3020.DIM_PROJECT = T3032.DIMENSION_KEY )
group by T3032.PROJECT_KEY_NAME_ID
order by c1
As you can see the SQL look very familiar, and I cannot see anything in SQL that should be the cause of this error. I think the error must be in the BI Memory or something.
Any ideas? -
Getting Error : Illegal cross join within the same dimension
Hi All,
At database there are 4 tables - XLE_Entity_profiles (A) , XLE_ETB_profiles (B) ,XLE_Registration (C),XLE_Reg_Function(D) .
Attribute info is as below -
A.Le_name
B.LRU_name
C. Registraton name
D. Function_code
I have to model a single dimension which contains the attributes from these tables and dimension should also support queries which contains attributes from this dimension only without selecting any fact.
For Exp - query is as below -
Le_name,Le-Registraton name,Le_Function_code,LRU_name,LRU_Registraton name,LRU_Function_code
To support such query , i created aliases of table XLE_Registration,XLE_Reg_Function.
Aliases names are - XLE_Registration_LE (E),XLE_Registration_LRU (F),XLE_Reg_Function_LE (G).,XLE_Reg_Function_LRU (H)
Attributes from aliases are as below -
XLE_Registration_LE- Le-Registraton name
XLE_Registration_LRU -LRU_Registraton name
XLE_Reg_Function_LE - Le_Function_code
XLE_Reg_Function_LRU - LRU_Function_code
i have renamed the attributes For LE and LRU.
The Physical layer diagram is as below
A < B
E F
G H
[A:B (1:M) , A:E(1:M), E:G(1:M),B:F(1:M),F:H(1:M)]
At logical layer , i have created a dimension DIM-LE with below logical table sources -
A ,B,E,F,G,H
Using the properties of LTS B , i mapped B to A.
Using the properties of LTS E , i mapped E to A.
Using the properties of LTS F , i mapped F to B.
Using the properties of LTS G , i mapped G to E.
Using the properties of LTS H , i mapped H to F.
Now when i run the query , i am getting the error -
Query - Le_name,Le-Registraton name,Le_Function_code,LRU_name,LRU_Registraton name,LRU_Function_code
+++Administrator:2a0000:2a0004:----2008/11/07 19:39:03
Query Status: Query Failed: [nQSError: 14065|http://forums.oracle.com/forums/] Illegal cross join within the same dimension caused by incorrect subject area setup: [
XLE_REGISTRATIONS T1218 On XLE_REGISTRATIONS_LRU.REGISTRATION_ID = XLE_REG_FUNCTIONS_LRU.REGISTRATION_ID,
XLE_REG_FUNCTIONS T5737,
XLE_ETB_PROFILES T900 On XLE_ETB_PROFILES.ESTABLISHMENT_ID = XLE_REGISTRATIONS_LRU.SOURCE_ID,
XLE_ENTITY_PROFILES T836 On XLE_ENTITY_PROFILES.LEGAL_ENTITY_ID = XLE_ETB_PROFILES.LEGAL_ENTITY_ID] with [
XLE_REGISTRATIONS T1155 On XLE_REGISTRATIONS_LE.REGISTRATION_ID = XLE_REG_FUNCTIONS_LE.REGISTRATION_ID,
XLE_REG_FUNCTIONS T5703,
XLE_ENTITY_PROFILES T836 On XLE_ENTITY_PROFILES.LEGAL_ENTITY_ID = XLE_REGISTRATIONS_LE.SOURCE_ID]
But when i run below query,which resembles the BI Answer query, against the database ,
select distinct A.NAME as c1,
B.REGISTERED_NAME as c2,
E.Function_code as c5,
C.NAME as c3,
D.REGISTERED_NAME as c4,
F.Function_code as c6
from
XLE_ENTITY_PROFILES A,
XLE_REGISTRATIONS B,
XLE_REG_FUNCTIONS E,
XLE_ETB_PROFILES C,
XLE_REGISTRATIONS D,
XLE_REG_FUNCTIONS F
where (A.LEGAL_ENTITY_ID = C.LEGAL_ENTITY_ID and
A.LEGAL_ENTITY_ID = B.SOURCE_ID and
C.ESTABLISHMENT_ID = D.SOURCE_ID and
B.SOURCE_TABLE = 'XLE_ENTITY_PROFILES' and
D.SOURCE_TABLE = 'XLE_ETB_PROFILES' and
E.Registration_id = B.Registration_id and
F.Registration_id = D.Registration_id)
order by c1, c2,c5, c3, c4,c6
i don't get any error.
Please let me know , why am i getting this error and how can i resolve this issue?Hi All,
Is there any update on this ?
Thanks,Ashish -
Illegal cross join within the same dimension
Hi,
When certain fields are selected within the presentation table an "illegal cross join" error is returned by the BI Server. However if a FACT is added from one of the other presentation tables the "illegal cross join" error goes away. we need to query without fact column.
We are getting following error
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14065] Illegal cross join within the same dimension caused by incorrect subject area setup: [ CALL_CENTER.COUNSELOR_MANAGER T782130] with [ CALL_CENTER.COUNSELOR_HR T781594 On CALL_CENTER.COUNSELOR_HR.MASTER_STAFF_COUNSELOR_ID = CALL_CENTER.MASTER_STAFF_COUNSELOR.MASTER_STAFF_COUNSELOR_ID, CALL_CENTER.MASTER_STAFF_COUNSELOR T781739] (HY000)
Can anybody help me solving this issue.
Thanks,
KS.Please give us an example of what you need.
OBIEE perform a query in the dimension or through the fact table.
You can't join two dimensions in the repository without going through a fact table.
If you need to query without fact column, it's because you have design two dimensions where
normally you can do one.
You have then two solutions :
* change the design of your logical model to make only one dimension.
* use the OBIEE logical SQL in answer.
http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_logical_sql
Success
Nico -
How do I make all the pages in the document to be the same dimension?
I have created a new PDF by merging several files together. How do I make pages to be all the same dimension?
Acrobat takes your files and merges them together, and uses the original dimensions of each document for the finished PDF file. I recommend changing the page size of the original document before converting to PDF.
-
To do further segregation based on company codes of the same Satellite syst
I configured the solution manager service desk with the satellite systems in such a way that it picks up the Business Partner (Sold to Party) from the IBase of the respective systems. This makes one Business Partner per one satellite System. So I am able to do the segregation of the service tickets based on sold to party. Users will post the tickets from the satellite systems only.
But if I want to do further segregation based on company codes of the same sold to party (Satellite system) in the solution manager, what needs to be done. Pls suggest.
Thanks and regards
BashaI configured the solution manager service desk with the satellite systems in such a way that it picks up the Business Partner (Sold to Party) from the IBase of the respective systems. This makes one Business Partner per one satellite System. So I am able to do the segregation of the service tickets based on sold to party. Users will post the tickets from the satellite systems only.
But if I want to do further segregation based on company codes of the same sold to party (Satellite system) in the solution manager, what needs to be done. Pls suggest.
Thanks and regards
Basha
Maybe you are looking for
-
Online Repair Support Services Down???
My iPod nano screen just went blank on me yesterday. I tried requesting repair services online for my defective iPod nano. However, the support services are down after the page about the "Five Rs". Alas, my warranty is due to expire tomorrow. I need
-
Is weblogic + ADF free for commercial use?
Hi, I have downloaded JDev + ADF 11.1.1.4 and its working great. Can any one please confirm and guide to corresponding links regarding commercial usage of weblogic? Is it free to use for commercial purpose? Thanks, Harish
-
If this isn't a bug, it's at least something needing improvement: I made a smart collection of images that had no keywords and then set out to keyword them. Turns out that if you click on a suggested or recent keyword, it immediately removes the phot
-
Create Trigger to insert records from one table to another
I created the below trigger to move data from one table to another after records have been inserted from another table to that table. What I need done is that each time records have been inserted into TEST_TBL, one of these actions codes should be im
-
Hi, I am using WLS 4.5.1 service pack 10 on Solaris 2.7. We have 8 servers on one machine running under java 1.1.7 with 128/196 min/max memory each. We use statelesss session beans only. One test case