I have a view that is missing certain pieces of data.
The MDX:
The MDX:
Code: |
select Crossjoin({[Fiscal Time].[All Periods].[2005]}, <br /> {[Measures].[Unit Sales], [Measures].[Dollar Sales]}) ON <br /> COLUMNS,<br /> Hierarchize(Union({[Warehouse].[All Whses]}, <br /> [Warehouse].[All Whses].Children)) ON ROWS<br /> from [Sales]</td></tr></tbody></table><br /> <br /> The attached image shows data missing for whse rows T & U.<br /> <br /> <br /> I got the SQL query from the mondrian debug log and put the same query into a mysql client:<br /> <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre>mysql> select `invoice_fact`.`whs_code` as `c0`, <br /> `invoice_fact`.`fiscal_year` as `c1`, <br /> sum(`invoice_fact`.`Qty_shipped`) as `m0`, <br /> sum(`invoice_fact`.`amt_shipped`) as `m1` from `invoice_fact` <br /> as `invoice_fact` where `invoice_fact`.`fiscal_year` = 2005 <br /> group by `invoice_fact`.`whs_code`, <br /> `invoice_fact`.`fiscal_year`;<br /> <br /> +------+------+---------+-------------+<br /> | c0 | c1 | m0 | m1 |<br /> +------+------+---------+-------------+<br /> | t | 2005 | 660144 | 10224245.94 |<br /> | TX | 2005 | -2697 | -114594.50 |<br /> | u | 2005 | 34 | 889.56 |<br /> | V | 2005 | 3310823 | 44259429.51 |<br /> | VX | 2005 | -1674 | -50804.85 |<br /> | W | 2005 | 115683 | 8593279.41 |<br /> +------+------+---------+-------------+<br /> 6 rows in set (29.60 sec)</td></tr></tbody></table><br /> <br /> This shows there should be data for the T and U rows. Why is it not displaying in the olap view? size=280]<img src="http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/jasperintel.png" width="Array"></img><br>Post edited by: Daryl, at: 2006/09/15 15:41 |
1 Answer:
Posted on September 26, 2006 at 4:13pm
It turns out that this problem is a case sensitivity issue. It appears that Mondrian is case-sensitive. The data in the mysql database is in non case-sensitive fields. The rows 'T' and 'U' that show no data have values 't' and 'u' respectively in their 'first' data rows in the database fact table. Mondrian seems to get confused at this.
My workaround was to make all the data in the fact table have consistent case.
My workaround was to make all the data in the fact table have consistent case.