(Null) Values in SSAS cube when selecting a role - sql-server

I have the following problem:
When I process a cube in SSAS and view the data as a normal user without restrictions all is well and the aggregated results show their normal values.
When I choose inside Data Tools (MsSQL 2012) to view the data as a specific role then all the security constraints work normally (For example I view only the Specific country data and no other) but all the corresponding values are (null).
I have tried Visual Totals = true and I have imposed those restrictions on both the dimension and the cube. The CALCULATE in calculation script is still there (everything works ok when I choose to use a normal user).
This is happening on both the measures and the calculated values!!!
Any ideas what could be happening?

Solved.
This problem had to do with cell data!!!
The Data Tools studio automatically checks the enable Cell Data permissions checkboxes in the respective tab.
If no MDX query is defined in these, then it is automatically assumed that you have no permissions to view any aggregated measure data!!!!
Uncheck them or define the proper MDX query and the problem will be fixed!!!!

Related

Drillthrough action displays only key attributes

I have an SSAS 2016 cube in which I defined Drillthrough action for the Main measure group (the only measure group).
I would like to display all regular attributes of a dimension in the Drillthrough so set it accordingly on the Action screen.
The design has been deployed and the cube reprocessed with ProcessFull option.
When using the drillthrough, Excel displays the key attribute of each dimension leaving out all those configured but of the regular type.
I have not managed to find a config setting on the server or on the cube that would enable/disable/limit this feature.
Any ideas?
I figured out and thought I'd leave an answer to my question in case anyone else bumps into this issue.
When I double click a Pivot table measure number in Excel and details show, it is not the drill through action that shows the data but some builtin mechanism.
The drill through action - when configured and available - can be reached from the pivot table's measure area right click menu.

SSRS Dynamic Reports for Key Value Pairs

I need to use SSRS to create many different reports, and I have been trying to find the best way for me to easily create them as need, and for users to navigate them and use them for their needs.
To give you and idea of the two sets of data I am dealing with:
EDI file from our customer
Raw data output from hardware configuration
Now the EDI data is fairly consistent, so these columns are static.
The hardware data is usually a massive list of different configuration. I receive them in different flat files formats and using SSIS or other tools I get the data into Key Value Pairs. Now in a report, I use matrix to keep EDI columns static, it matches with the hardware on serial number, and Hardware data pivots.
So the report does not break, and so I don't give the user too much information, it matches up on another table where I specify what keys I want to be columns.
Here is a small example of one of my reports:
The green columns are EDI, while the orange is the hardware.
My question is, is there a better way for me to be doing this? Some reports can get complicated like needing total for certain hardware (counting hardrive space, ram total etc.) which is difficult to do dynamically.
I have tried creating in reports in this fashion, with these parameters:
This way I can create the Key columns per project and user can select what report they want to run. The default is All Data.
Is there a better way for me to create these reports? SSRS really doesn't seem to play well with dynamic pivots.
Is there a better tool that will handle these reports dynamically, or let users pick and choose what they want to see in a report?
I can't visualise your data but if I understand correctly, you could have a dropdown list showing all the unique values that are in the column you are using in the column group. Set this to be multi-value and then simply have the WHERE clause read something like
SELECT * FROM myTable WHERE myColumnGroupField IN (#myColumnChoiceParameter)
This way the user could select whichever columns they would like.
You could extend this by adding another parameter that has some preset groups of columns (I think you might have one of these already if I understand correctly) that would set the default value of the main #myColumnChoiceParameter parameter.
If you want something more flexible then you might want to look at Power BI but depending on how you intend to deploy that might not be a simple option.
You cannot dynamically create columns in SSRS but you can control the visibility of the columns.
1) Create a list in table that contains the names of all the columns that yo want to toggle and include a column titled 'All'.
2) Create a parameter that is based on this table and make sure multi-select is turned on.
3) Right click on every column that you want to toggle, select visibility and then create a condition that checks if the user either selected All or selected the column from the parameter list.
4) Train users that by selecting and deselecting from the dropdown they control whats visible.

Pivot shows single record field value that doesn't agree to tabualr data model value (source data) - misaligned?

I have found something I'm a little concerned about. Was trying to get a measure working and had it as a calc column previously so was comparing the 2 different outputs and checking for line by line differences. I picked a good one and investigated. calc column value was zero, measure value was £42. The calc column is correct. So i drilled into my measure to see what i could find. Alarmingly, I found that for a certain field called DocumentStatus the pivot showed it as "LIVE". But if I go to the table in visual studio and find that order the status is "COMPLETED". I have checked and rechecked. There is only 1 order on this table with the right DocumentNo. The pivot seems to think this order is LIVE but the source data definitely shows it as completed. What??? How can this happen?
So strictly speaking the measure is actually calculating correctly because it is seeing the order as live therefore picking the £42 value is correct for that formula. The calc column is correct because it is seeing the order as completed so picking zero as the final value is correct.
It is the fact that the record is being seen as both live and completed that is throwing me. I'm concerned to say the least. This feels like a bug. I have checked and have no other filters in play. I have checked other ways too - like filtering on all orders with a £42 value in a particular field - none of the have a LIVE status. Its almost like that field is misaligned in the background.
Has anyone ever seen this?
TIA
SSAS Tabular; SQL Server 2016, Visual Studio 2017
Edit 5 Jul:
Thanks for your comments. Unfortunately I cannot provide sample data due to strict confidentiality. I have provided 2 screen shots below, both showing the same record - (1) is the view from the excel pivot table that is connected to the ssas tabular data model (2) is the view of the table in Visual Studio (note how the value of the Accrued Income measure in this view is not the same as the AccruedIncome total in the excel pivot table)
I am wondering if this is to do with the way that I have deployed recent edits to the data model. Every time I make a change I am running the deploy & build commands so that I can refresh the excel reports to see if they are working as intended. What I don't know is when I do this am I deploying the metadata only or the metadata and the actual data (several hundred thousand rows on a dozen or so tables)? Is the issue here that the pivot is looking at an older set of data than the dataset visual studio is looking at? When I deploy & build do I then need to process the SSAS tabular object to update the data?
Also note how the DocumentStatus is different in the 2 views.
Excel pivot
Visual Studio

SQL Server Analysis Service: Need to suppress empty results

We have a very sparse cube in SSAS. The size of the cube is only 50M bytes in MOLP storage. When writing your own MDX query, you can use NON EMPTY/NONEMPTY to suppress/filter out empty results. But we have a 3rd party tool (Cognos Analysis Studio) for our Business Users to run ad-hoc analysis against the cube. At first the users drag in dimensions and measures using Cognos Analysis Studio, the initial results come out with empty results. Then the users try to suppress the empty results. It takes an extremely long time to come up with non-empty results.
Since the MDX is generate by Cognos, we don't have control over how the MDX is generated to run against the cube. Our users using this cube are only interested in non-empty results. We'd like to know if there is a behavior control in a SSAS cube to always return non-empty results.
Question:
How can we set (or achieve) a cube-wide behavior to always suppress empty results?
I think the feature you're looking for is called "zero suppression". Click on “Settings”, “Suppress”,
“Zeros and Empty Cells”. This changes the default which will only suppress empty cells and not cells filled with zeros. Or, click on a column in the report. Click on the “Zero Suppression” icon at the top. Any row that is filled with zeroes will disappear.
You can google on "zero suppression cognos" to get more explanations about this.
I don't know if Cognos Analysis Studio allow using sets. If so, try creating non empty of dimension attribute against default cube measure in MdxScript. Then use this set instead of original dimension attribute.
For example
CREATE CURRENTCUBE.[Set1] as NonEmpty([Dim1].[Atr1].allmembers, [Measures].DefaultMember);

Cross-reference Distance chart in SQL Server 2008 or Excel?

I would like to cross-reference construct a distance chart similar to the one here (example is a road-distance cross-reference chart) and, ideally, store the data in SQL Server 2008 (preferably the Express version). It needs these properties / abilities
Every column has a corresponding row with the same name (ie. not misspelled like my example).
Changing the value at one Row-Column intersection would update the mirror intersection (Column-Row) or the mirror data could be ignored.
The distance-values would need to be end-user editable.
The end-user would need to be able to add, delete or rename a column/row pair.
The end-user needs to be able to sort the columns and have the rows move automatically.
There could be hundreds of pairs.
a look-up query needs to find a distance given a start & destination (Row & Column)
The distance chart is reasonably straightforward to implement in Excel. Considering this, am I better off...
Using Excel as the user editing UI and then updating an SQL 'thing' with the new data?
Using Excel as the data-source even if it means performance issues with querying the data?
Using an as-yet undiscovered stroke of genius detailed here in an answer?
Sure looks like an Excel application to me, start to end. (heh)
I can't imagine your users typing enough data in to make performance an issue. Excel will only take 32757 rows by ditto columns. If that's enough, I'd say you're golden.

Resources