Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Adding color coded measure to existing OLAP pivot table

$
0
0

The following complete MDX statement will 'color code' the measure [Prior Mo Amt] depending on its value.

=========================

With MEMBER [Measures].[Prior Mo Amt] AS

sum(PARALLELPERIOD([Accounting Date].[Accounting Period].[Accounting Period],1, [Accounting Date].[Accounting Period].CurrentMember),
[Measures].[Chart of Account Balance - Actual]
),

FORMAT_STRING = '$#.00',
BACK_COLOR = IIF([Measures].[Prior Mo Amt] < 0, RGB(100,100,100), )

  Select {[Measures].[Chart of Account Balance - Actual], [Prior Mo Amt] } ON columns,

 [Accounting Date].[Accounting Period].members on rows

  from [Financials]
CELL PROPERTIES VALUE, BACK_COLOR

=========================

However, I'm only trying to add the measure [Prior Mo Amt] to an existing Excel cube using the 'OLAP Pivot Table Extensions' add-in.  This means that I'm just entering the COLUMNS expression into a box since the 'ROWS' expression as well as the 'FROM' statement are already defined elsewhere in the cube. 

But I can't figure out how write the COLUMN expression so that it will also do the color coding. I tried the below statement, however,  no color change occurs in the pivot table when it should have:

****************************

sum(PARALLELPERIOD([Accounting Date].[Accounting Period].[Accounting Period],1, [Accounting Date].[Accounting Period].CurrentMember),
[Measures].[Chart of Account Balance - Actual]
),

FORMAT_STRING = '$#.00',
BACK_COLOR = IIF([Measures].[Prior Mo Amt] < 0, RGB(100,100,100), )

(Note that the necessary expression 'CELL PROPERTIES VALUE, BACK_COLOR' is already in the main MDX statement of the report)

****************************

Can anyone help me with the syntax for how I add this measure to the pivot table with color coding? Thanks



Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>