Skip to content

Commit

Permalink
MONDRIAN: Test that a property against a calculated member can refere…
Browse files Browse the repository at this point in the history
…nce that member in the formula.

   And, a straggler.

[git-p4: depot-paths = "//open/mondrian/": change = 5306]
  • Loading branch information
julianhyde committed Feb 2, 2006
1 parent f408bce commit 8242330
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions testsrc/main/mondrian/test/TestCalculatedMembers.java
Expand Up @@ -439,6 +439,22 @@ public void testBracketInCubeCalcMemberName() {
"Row #1: $1,352,150.00",
""}));
}

public void testPropertyReferencesCalcMember() {
assertQueryReturns(
"with member [Measures].[Foo] as ' [Measures].[Unit Sales] * 2 '," +
" FORMAT_STRING=IIf([Measures].[Foo] < 600000, \"|#,##0|style=red\",\"#,##0\") " +
"select {[Measures].[Foo]} on columns " +
"from [Sales]",

fold(new String[] {
"Axis #0:",
"{}",
"Axis #1:",
"{[Measures].[Foo]}",
"Row #0: |533,546|style=red",
""}));
}
}

// End CalculatedMembersTestCase.java
2 changes: 1 addition & 1 deletion testsrc/main/mondrian/xmla/test/queryFiles/executeHR.xml
Expand Up @@ -117,7 +117,7 @@
</Tuples>
</Axis>
</Axes>
<CellData>
<CellData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Cell CellOrdinal="0">
<Value xsi:type="xsd:double">39431.6712</Value>
<FmtValue>$39,431.67</FmtValue>
Expand Down

0 comments on commit 8242330

Please sign in to comment.