I want to use an MDX drill through command but i also want to join it to some SQL tables as well.
that is there will be an Id in the fact table and not a lot of other data I want to join this on to another table or view and produce a report based on those ID's returned in the drill down.
Ideas?
MDX won't do this directly. The only way I can think of doing this would be to retrieve the recordset from the drillthrough (which can be done with ADO), load it into a temporary table and join it against whatever else you want in a query.
The other option is to widen the drillthrough (if the dimensions have the data you need) and get the fields from that. Note that SSAS2005+ can support multiple drillthrough actions.
This MSDN article has some code snippets that demonstrate working with record sets returned from a drillthrough.
Related
I am new to Tableau and don't want to mess the database. Is there a safe way to find out the table names from the dataset used to build a tableau dashboard?
Hard to say without seeing what you see but generally, the dimensions on the left panel are organized in a table hierarchy. In the image below you can see three tables. One has been expanded to show the fields (dimensions) used. The other two tables can be expanded by clicking on the >
Just wondering if anyone had encounter this situation, that calculated table returns no row, but when evaluating the DAX it returns correct result.
In one of my tabular models, I created several summarized tables to improve query performance. The summarized table linked to the project table by project ID. I also have a row level security applied on project table.
For some reasons, I was told the report does not work. When I use SSMS to browse the tabular model via user's account, I found that if I evaluate the table directly it returns no row, e.g.
evaluate my_summarized_table
But, if I evaluate the formula directly it returns correct result, e.g.
evaluate Filter(Summarize(mytable, 'Project'[Project Id]...))
I tried to use SQL Profiler and $system.Discover_Sessions but could not figure out what is the difference between the calculated table and the raw DAX query.
Had anyone have this situation before? What could be the possible reason for that?
I have a dataset that was build using MDX (analysis cube). I have a table with few columns. Now, I need to add one more column with specific data that is available in sql db and not cube. I know it is not possible to do that. What can I do to work around this issue?
Thank you
Hopefully you've using 2008R2, so you can use the LOOKUP or LOOKUPSET functions to match items from one datasource to another:
http://blog.datainspirations.com/2010/04/07/sql-server-2008-r2-reporting-services-look-up-part-iii/
It was released two years ago, so hopefully you're up to date?
You can, for each rows in your table, define a subreport that pulls the data from sql server based upon the mdx dataset. Note that the query to sql server will be made as many times as the number of records in your mdx dataset.
I have access to an OLAP catalog, but I am not familiar with MDX. I am looking for the MDX equivalent of SQL:
SHOW DATABASES;
SHOW TABLES;
I was looking at MDX language reference, but I could not find a way of getting the schema, the cube metadata. Thanks for helping.
You can use the $SYSTEM database to query your objects.
Use SELECT * FROM $SYSTEM.DISCOVER_SCHEMA_ROWSETS to get a list of things you can query. In your case it would most likely be DBSCHEMA_CATALOG, DBSCHEMA_TABLES and MDSCHEMA_CUBES.
This is very rough information, and using stuff like Preet suggests might be favorable in the end.
There is answer List dimension members with MDX query to show how list dimensions.
This open source project (TSSASM) shows how to query access the cube structure from a TSQL database.
However I think you may need XMLA commands to see what you need.
Question: In the Crystal Reports report creation wizard there is the option of changing the order which more than two two tables are linked. The link between Table A and Table B could be made before Table C is linked, or vice versa. It says "The order may affect the resulting data set."
How could that be true? I could see it affecting performance but 3 linked tables should always return the same dataset, shouldn't they?
Depends on what type of Join crystal is using when "linking".
Left and right joins will only pull matching data from either side of the "link". Any null or empty data will be discarded and in some cases you don't want that.
I haven't used Crystal report so far. But your underlying question is about query performance I can comment on it. What database, version you have? In Oracle 10g the rule based optimizer is replaced with cost based optimizer. RBO takes the order of tables into consideration. CBO does not. So, it should work just perfect for you.