Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

Using & ldquo; Show values ​&ZeroWid ...

$
0
0

I have an Excel 2007 pivot table showing "Year" across the top and "Month" down the side. What I am trying to do is represent the values as "% Difference" from the same month of the previous year. (Ex. If Jan-07 is $100,000 and Jan-08 is $120,000, I would like Jan-08 to show '20%'). However, every time I try to do this (using the "Show values as" tab of Value Field Settings) all of my numbers go to '#N/A'. Is there a way to do this using an Analysis Services cube as the data source? When I do this exact same thing using data on a different sheet as the data source for the pivot table, it works fine.

I'm not sure if there is any way of doing this in Excel, but you could create a calculated measure in your cube that would do it.

The MDX expression would look something like the following:

([Measures].[Amount] - ([Date].[Year].PrevMember, [Measures].[Amount])) / ([Measures].[Amount])

Viewing all articles
Browse latest Browse all 3160

Trending Articles