Microstrategy documents - matching differen attributes with the same value - attributes

I'm building a document with a dashboard-like appearance.
I'm using radio buttons for selecting the year.
Sadly in one of my datasets the attribute year is another attribute, even if contains exactly the same values.
How can I solve the problem of matching attributes basing on their values in documents?
Basically i want to click on the radio button 2013 and select the value 2013 in graph1 containing the attribute named year and in graph2 containing the attribute named year-of-observation.
I did as you told me.
I added an advanced qualification fiolter to the report that contains year-of-observation:
[Year]#ID = [Obs-Year]#ID
Then I added the attribute year to the report.
But when i try to execute the report have the following error:
Report: xxxxxxxxxxx
Job: 8600588
Status: Execution failed
Error: SQL Generation Complete
QueryEngine encountered error: The report contains a cross join in pass 1 between tables ANSWERS and YEAR. Execution is aborted per the cartesian join setting..
Error in Process method of Component: QueryEngineServer, Project xxxxxx , Job 8600588, Error Code= -2147212544.
Starting Time: 15:13:50

You can't... or you can try to add the attribute year in the report with year-of-observation and put a filter year = year-of-observation, at this point many things can happen:
If the two attributes have no relationship, the lookup table for year will be added to your report query in cross join, but you don't worry because the filter will limit the results to the right ones.
If one of the attributes is parent of the other you won't have cross join, then remove the filter, but double check the results (just in case)
If Year is already mapped on one of fact tables used by the report you and there is no 1:1 correspondence between year and year-of-observation you could have wrong results.
Also
Assuming Year and year-of-observation have no relationships, if they are mapped on the same lookup column of the same table (no aliases, no role recognition) MicroStrategy will use only one lookup for both attributes so there is no need for the filter.
A word of advise
Anyway it's a good practice to keep different logical entities (like two attributes) separated, but (probably not your case) when they are the same thing just use one.
Advanced level
Another possible solution is to play with relationships: you can try to make the Year parent of year-of-observation, then include the year attribute in the report where is missing, but if this is really feasible depends on your schema, you could end up with messy hierarchies path if you have already children for Year and Year-of-observation.
Cross Join Error
In case you follow solution #1, you could receive an error related to the Cross Join. This happens because the SQL Engine is trying to protect you from Cross Joins (usually a bad thing).
To disable this error you need to change the following VLDB property for the report (or you can change it also at Project level if you have many reports with Cross Join):
VLDB Properties -> Joins -> Cartesian Joins Warning

Related

how do i correctly set up a parameterized information link in spotfire?

Also posted on super users:
I'm a spotfire novice trying to create a parameterized info link. Ultimate goal is to create a default template that may be customized to return specific rows in a very large table. I've not been able to cobble together enough information from online searches to get me from point A to Z.
Spotfire version is 7.11 on an Oracle 11.2 SE DB.
Currently I've got a date/time prompt in the info link that will be global to all users. What I need is to be able to further filter to 1 of 2 columns (one is real, the other a string) in order to minimize loading times. There are 17 other on-demand tables that are related to the main one. Limiting the initial query will greatly speed up performance.
In information designer for the information link, if I edit the SQL in the WHERE and explicitly define the value or string for the column, I get the rows I want. When I try to define it using an input parameter (?ParamName), I either get nothing when I reload or get asked to input a parameter "for testing".
Q1: In the document properties for the analysis, I've been adding in properties that I assume is supposed to get picked up by the query.
- What part do scripts play in passing this variable to the SQL?
- Do I just need to define a value for a property name or include a IronPython script? - If script is required, can I just define the parameter to pass?
Q2: In the info link SQL, what is the correct syntax for defining the parameter variable depending on the type (real v string)? If I use a string, I need to include LIKE in order to pick up the desired rows. If I use a real, is it possible to define it as a list of values?
Thanks in advance.
Though not exactly clear from your description, I think you should be able to accomplish your goals using the "Load on demand" dialog that is accessed either when you add your data table to your analysis, or subsequently using the Data Table Properties>Type of Data>Settings dialog.
Spotfire uses this dialog to dynamically modify your SQL. Thus, you do not need to explicitly include the LIKE statement in your SQL. Spotfire will add it in based on what you define in the On-Demand settings. For example, you could have an Input Field where you type a constraint that will be stored as a Document Property and then refer to that Document Property in your On-Demand settings to control the table loading.

OnDemandGrid column sorting isn't working with dstore/Rest and Django Rest Framework

I have created an OnDemandGrid but noticed that the column sorts weren't working on any column. The arrows are there and the screen refreshes, but it won't sort the columns in asc or desc order. I have even tried specifying for each column but it still doesn't work. Anybody having/had the same issue?
UPDATE: 6.16.15 - After trying sortParam suggestion:
Comment below explains. It appears to be doing the right thing... but still won't sort.
UPDATE 6.16.15 - 4:00pm
Apparently ANY type of filtering or sort doesn't work well with Django - trying to determine how set filtering where dojo can communicate to Django Rest or vice versa - so far haven't been able to find a setting on either side that works. Not only does column sort not work - creating a search field doesn't work, nor creating a sort button.
This is after changing to the ORDERING_PARAM in DJANGO settings.py to 'SORT'... for all intensive purposes this looks like it should work.
A quick search through the Django Rest Framework documentation reveals that it defaults to expecting an ordering query parameter to indicate which field should be sorted. The dstore/Request store (inherited by Rest) allows you to indicate the query parameter name that sends sort information, via sortParam.
Additionally, it appears that DRF's OrderingFilter indicates ascending sort with no prefix, and descending sort with -. dstore/Request defaults to expecting + and - as prefixes, but these can be overridden via ascendingPrefix and descendingPrefix.
So in your case, you'll want to include sortParam: 'ordering', ascendingPrefix: '' in the properties passed when you create your Rest store instance.
In general, when you run into store-related issues like this where the grid and backend don't seem to be making ends meet, this is the process you'll have to follow - find out what the server expects, find out what the client-side store implements, and see if it can be tweaked or needs to be customized.
UPDATE 6.17.15 -
Changing server side settings to match dojo/dgrid parameters -
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAdminUser',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
# 'PAGE_SIZE': 25,
'ORDERING_PARAM': 'sort'

COGNOS gives error 'Column ambiguously defined'

When I try to run a report in COGNOS Report Studio, I get error : ORA-00918: column ambiguously defined
Now there is no way to get the runtime sql and test it out against the oracle db. So I am left groping around.
My question is...when we develop the model in framework manager, we do not write our own sql. Just specify the tables and columns and joins. So the error should never come because this error come when you forget to prefix a column name with the table alias.
I agree it is odd. Start removing data items from the query until it works. Try to narrow it down to a specific data item within a table. See what SQL is generated without the offending field, that should give you a hint as to what is going on.

How to perform duplicate detection when your matchcode length is > 450?

I have an entity that has three fields that need to form a unique constraint in my CRM 2011 Organizations, but when I enter them in for a Duplicate Detection Rule, the resulting matchcode length is too long.
At first I was going to just add an odata query in javascript on the form to ensure that no record existed for the unique constraint, but that doesn't catch data import issues.
Is there some way to get around the 450 character limit, or am I most likely going to need to create a plugin?
Using a new field, that contains the values of the 3 fields you want to create the duplicate detection rule, may be an option. You maintain the state of this field with a workflow (on create/update) and apply the duplicate detection rule on it (if the new field does not exceed the limit of the matchcode).
The approach with the plugin may be another choice if the above is not a convenient solution for your scenario.
You can choose to only use part of of one or more of your field eg the first 150 characters - do you really need to be checking the whole of these long fields for absolute uniqueness?
In how many cases would the first 150 characters of each of three fields be identical but not the last bit (which would be the false-positives this causes)?

Avoiding duplicates in drupal 6 views2-relationship-results

I'm trying to build a list using drupal6, views and node reference.
The list should be look like:
vehicle 1
feature 1
feature 2
feature 3
extra 1
vehicle 2
vehicle 3
The vehicle is a custom node-type, feature and extra also. In my view I'm listing all vehicle-node (as fields), added relationships to feature and extra nodes and added the reference-fields.
Now I'm getting the desired list. But when the displayed node contains more than one relationship of the same type (see feature in vehicle 1 in list above) I'm getting one result line per relationship (vehicle 1 get displayed three times).
Is there any way to group these results?
After some longish time searching and trying to implement custom theming solutions to combine the duplicated results, I found a similar question at drupal.org where i found some useful hints:
It seems to be an SQL-related issue (described here) not "solvable" with views2.
I'm now using the Reference view module (http://drupal.org/node/1319746) which allows to set up "child"-views (i.e. features and extras) I can include as fields in my original view (vehicles).

Resources