SQL Server Reporting Services, Power View


Problem getting SSAS YOY Percent Change to show in SSRS


I have tried two different methods to get Year over Year Growth % from my cube to show up in SSRS. I have not been successful with either approach. Any thoughts are appreciated. Here are the approaches I have tried. thank you.
1. I used SSAS built-in Time Intelligence Wizard to calculate Year over Year growth % for my measure. The % is calculated and displayed accurately when I view it in the SSAS cube browser and in Excel. However, when I access it from SSRS,
it shows as 'Infinity'.
2. I tried another approach I read about in a couple other posts ("Optimizing time-based calculations in SSAS"
and “A Different Approach to Implementing Time Calculations in SSAS”). I created a Time Calculation Dimension (shell dimension applied to the measure). This as well shows the Year over
Year Growth % accurately in the SSAS Cube browser and in excel. However when I access the cube from a Matrix in SSRS it shows the Year over Year Growth % as -1 or -2. I have followed in a post called "Using SSAS formatting
in SSRS" to get the proper format to show up. So it is now a percent format, but instead of -1 I now get -100.00%. But the actual value that is in the cube won't show up in SSRS.
Hi Mary,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Best regards,
Qiuyun YuQiuyun Yu
TechNet Community Support
Qiuyun Yu, thank you. I look forward to getting this resolved. thanks, Mary
Qiuyun Yu
any luck yet on how I can fix this bug between SSAS and SSRS?
thank you very much,
Mary
Hi Mary,
May I know what is the data source of the report of SSRS? Is the same SSAS?
Per my understanding, excel may contains the function to auto calculate. But reporting service report needs to implement manually. Please check the definition of the field in report and dataset logic.
Also provide the alternative way of built-in Time Intelligence
http://stackoverflow.com/questions/11467704/ssrs-report-using-ssas-cube-time-calculations
Thanks,
Wynn
thank you for your reply. My data source I am using in SSRS is an SSAS Cube with a Time Calculation Dimension (shell dimension applied to the measure). Here is some more information
1) Here is the Calculation script in SSAS.
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If deleted or modified, the data within the cube will be affected.
This command should only be edited if you intend on manually specifying how the cube will be aggregated.
*/
CALCULATE;
-- from credit to website (www.obs3.com “A Different Approach to Implementing Time Calculations in SSAS”).
-- Time Series Calculations using the SCOPE command to fix on a sub cube
-- Create the calculated members
CREATE MEMBER CURRENTCUBE.[Time Calculations].[Prior Year]
AS Null,
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Fact Line Count Time' ;
CREATE MEMBER CURRENTCUBE.[Time Calculations].[Prior Year Chg]
AS Null,
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Fact Line Count Time' ,
SOLVE_ORDER=2 ;
CREATE MEMBER CURRENTCUBE.[Time Calculations].[Prior Year Chg %]
AS IIF([Time Calculations].[Prior Year]=0,NULL,
[Time Calculations].[Prior Year Chg] / [Time Calculations].[Prior Year]),
FORMAT_STRING = "Percent",
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Fact Line Count Time',SOLVE_ORDER=1 ;
-- from credit to website (www.obs3.com “A Different Approach to Implementing Time Calculations in SSAS”).
-- Scope for the specific Measures - commented out, this is more limiting
---Scope({[Measures].[Line Count]});
Scope (MeasureGroupMeasures("Fact Line Count Time"));
-- Scope time Hiearchy at highest level - year
Scope([Time].[Year].[Year].members,[Time].[Date]);
-- prior year calculation
([Time Calculations].[Prior Year]=
(ParallelPeriod([Time].[Year - Quarter - Month - Date].[Year], 1,
[Time].[Year - Quarter - Month - Date].currentmember)
,[Time Calculations].[Current Period])
);
-- Now do the Variances which do not depend on a particular hierarchy
-- Prior Year Chg
([Time Calculations].[Prior Year Chg]=
[Time Calculations].[Current Period] - [Time Calculations].[Prior Year]);
End Scope;
End Scope;
2) here is the MDX query in SSRS
SELECT NON EMPTY
{ [Measures].[Line Count] } ON COLUMNS, NON EMPTY
{ ([Dim Study].[SK Study ID].[SK Study ID].ALLMEMBERS
* [Dim Study].[Study State].[Study State].ALLMEMBERS
* [Dim Study].[Year].[Year].ALLMEMBERS
* [Dim Svc Code].[Svc Code].[Svc Code].ALLMEMBERS
* [Dim Svc Code].[Svc Code Description].[Svc Code Description].ALLMEMBERS
* [Time].[Year].[Year].ALLMEMBERS
* [Time Calculations].[Time Calculations].ALLMEMBERS ) }
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM ( SELECT ( STRTOSET(#DimStudyStudyState, CONSTRAINED) )
ON COLUMNS FROM [LineTrendCube]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
3) I used the SSRS Query Designer when preparing the MDX Query against my Cube Data Set. The resulting MDX did include NON EMPTY (). I don't know that it is a divide by 0 problem, because the YOY Growth % value does
not display properly for any of my data, not just those rows that have a 0 in the Prior Year (which would be the denominator). The SSAS Calculation code does account for the 0 in Prior Year (which would be the denominator).
And I used the SSRS Matrix Wizard to place the data on the report similar to how I would use SSAS Cube browser.
When I run the SSRS MDX Query I can see that the column Time Calculations has values 'Current Period', 'Prior Year Chg', 'Prior Year' and 'Prior Year Chg%'. The next field, my measure field (Line Count) all displays the same value for Current Period,
Prior Year Change, Prior Year, it has the value of Current Period. And the 'Prior Year Chg%' has a -1. however, when the data displays on SSRS in the matrix, it is able to determine what values should be placed in Current Period, Prior Year, Prior
Year Change. It just can't decipher Prior Year Chg %.
Unfortunately, I don't know MDX and have been relying on using the designer and wizards.
Hi Mary,
Based on my understanding, when you use the SSRS Query Designer to check the dataset result, the YOY Growth % is already incorrect? And the MDX query is generated by the wizard and you did not do any change on it. And the same query can get
correct data in SSAS cube browser.
Currently I cannot find where is the problem, I'm afraid you have to take some time to learn the MDX. Find some links about
How to calculate percentage in MDX for reference:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/af950e5f-9f66-4ccc-ad20-7debcf2b7498/how-to-calculate-percentage-in-mdx
https://msdn.microsoft.com/en-us/library/ms146084(v=sql.110).aspx
Thanks,
Wynn
thank you for the links.

Related Links

Adding table tag SSRS report placeholder
Passing Multiple Text Parameters in Action
Can not change _TOP target on links in reports from SharePoint 2013 / SSRS ( GO TO URL )
row groups - filter - not all records that should be are shown
Report Builder - Indicator Assistance needed Please
Consuming REST Web Service in SSRS
Migrating/Upgrading Reporting Services
alternative to scanning source control for ssrs dependencies
I am unsure how SSRS is configured in my Environment
SSRS 2016
pass year and month as parameter
C# Code to delete reports from Report Manager
SSRS Total Time In and Out Breakdown
How to stretch the tablix column wide based on a condition in SSRS 2014
SQL SERVER MOBILE REPORT PUBLISHER - Default Value for SelectionList Navigator
SSRS 2016 Parameters option disabled in an iFrame after applying CU1 or CU2 update

Categories

MSDN
Using Forums
Game Development
Windows Phone Development
.NET Framework
DevLabs
Microsoft Sync Framework
Smart Device Development
Windows Embedded Compact
Orchard
Bing
Development
Microsoft Research
Samsung PC
Expression
Microsoft Azure
Archived Forums X-Z
Windows Phone Preview ...
Microsoft Partner Center
Maps In Windows
Visual C++
C++ Standards, Extensi...
Visual Studio General ...
Visual Studio LightSwi...
Developing Universal W...
Payouts and Reporting
Windows App Studio Beta
Store Engagement Frame...
Application Security f...
Windows Desktop Sideba...
Windows Desktop Search...
Developing Apps for Of...
General Office Develop...
SharePoint 2013 - Deve...
SharePoint 2010 - Deve...
SharePoint Legacy Vers...
SharePoint Legacy Vers...
Service Bus
Azure Media Services
Azure Stream Analytics
Language Understanding...
Azure Data Catalog
Azure DevTest Labs
Azure Stack
Azure Analysis Services
Azure Database for MySQL
Windows Workflow Found...
Team Foundation Server...
Team Foundation Server...
Team Foundation Server...
WCF Data Services
Microsoft Robotics - D...
Visual Studio Smart De...
.NET Framework inside ...
SQL Server Documentation
SQL Server Application...
SQL Server PowerPivot ...
Standard 7: Misc
Windows Embedded 8.1 I...
SQL Server 2012 PowerP...
SQL Server 2012 Master...
Windows Forms Designer
MSDN and TechNet Searc...
Script Junkie Discussion
App Linking
Microsoft Automatic Gr...
Bing Maps REST, SOAP, ...
Exchange Server Protocols
Office Protocols
Project Customization ...
Exchange Server Develo...
Microsoft Lync Server ...
Accessing Web Services...
Acropolis
Audio API and Programm...
Building Windows Store...
Building Windows Store...
Deep Zoom Composer
Dryad, DSC, and DryadL...
Game Technologies: Dir...
Getting Started With V...
HD DVD Interactivity A...
Hobbyist Zone
LINQ to SQL (Pre-Release)
Microsoft adCenter: De...
Project Codename:  Jasper
Oracle on Azure
Parallel Programming w...
Search Server: Develop...
Search, Organize, and ...
Server Core Developers
Silverlight (formerly ...
SyncFx - Feedback [Rea...
SQL Server 2014 Self-S...
SQL Server 2014 Databa...
SQL Server 2014 Analys...
Visual C# Express Edition
Visual Studio Team Ser...
Visual Studio Class De...
Visual Studio Web Perf...
Web Gadget Development
Web Sandbox - Exploits
Windows Desktop Vista ...
Windows Live Alerts De...
Windows MultiPoint Mou...
Windows Workflow Found...
XNA Game Studio Express
.NET Native Preview
Skype Web SDK
Maps In Windows - APIs

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile