Cognos 11 - Allow multiple use of a database table in your data module - cognos

I'm working on Cognos 11 on a new Data Module.
I'm using fact tables and dimension tables.
One of those tables is Geography. For a location I have all the information someone could need to use.
My problem is as follow : I have a departure location and an arrival destination.
For now, Conos 11 does not allow me to use my Geography table multiple times so it may describe Departures and Arrivals
Does someone know how I could solve my problem ?
Obligation : We do not want to upload a file, so extract/create a file/upload on C11 is not valid

Kimball et al say that generic dimensions isn't a good idea. The geographic attributes belong in the dimensions which these attributes describe. For example, have geographic attributes in your customer dimension, geographic attributes in your store dimension, and geographic attributes in your warehouse dimension etc.
If you upgrade to 11.1.1 there's copy and paste functionality, which will allow you to create aliases. You can also create views, unions, excepts etc.

Related

Modeling Analysis service tabular fact with many columns

I have a tabular analysis service fact table with more than 150 attributes (degenrate) and measures (Invoice fact table).
I would like to improve the user experience when browsing the table on azure AS.
Is it a good idea to split the table horizontally to 3 tables each table contains a set of columns and measures (the number of rows remains the same on 3 tables) ?
I don't change a model for browsing's sake. Browsing is a reporting issue. Modeling is modeling. Build a good dimensional model in a star schema. Big wide tables are bad.
I would look for anything that ought to be a dimension to pull out, and build some junk dimensions, and for sure I would move the measures to a DAX table. But if whatever is left is ugly, then I would just leave it and build a report for browsing.

How to connect data in Excel Power Pivot data model with no unique identifier

I am trying to build an Excel Power Pivot data model using restaurant inspection data from my city, though I'm having trouble envisioning how to get this to work properly. I have three files I've imported into the data model but cannot figure out how to link:
business_lookup; each entry is unique with a business ID number, a business name and address.
inspection_lookup; each entry is distinct inspection on a specific date for a specific restaurant but has no unique identifier. It does not distinguish how many violations were found on this visit, just that a visit occured.
violations; a file full of each individual violation found on each of the inspection_lookup dates. It has the business ID, date and a description of the individual specific violation. For each inspection in the inspection_lookup, there are typically multiple corresponding violations in this table.
The problem, to my understanding, is that there's no unique field like "inspection_ID" that could link the inspection_lookup file to each of its many findings in the violations file to allow me to say on June 5, 2020, Jim's Fish House had three violations and they were X, Y and Z. I can connect both to the business_lookup file easily enough, but I can't figure out how to link these other two tables. How can I connect these two other files when all I know is that the unique business ID was inspected on a common date?
If in inspection_lookup you have date and specific restaurant (I assume it corresponds to business ID or business name), you can create unique key by concatenating these 2 columns (given you cannot have more than 1 inspection on the same day in the same restaurant). You can create the same unique key in violations and connect these 2 tables. Business_lookup has unique values so you can connect it to violations or inspection_lookup based on your use case.

Tableau Calculated Field using FIXED

I have a database in Tableau from an Excel file. Every row in the database is one ticket (assigned to an Id of a customer) for a different theme park across two years.
The structure is like the following:
Every Id can buy tickets for different parks (or same park several times), also in different years.
What I am not able to do is flagging those customers who have been in the same park in two different years (in the example, customer 004 has been to the park a in 2016 and 2017).
How do I create this calculated field in Tableau?
(I managed to solve this in Excel with a sumproduct fucntion, but the database has more than 500k rows and after a while it crashes / plus I want to use a calculated field in case I update the excel file with a new park or a new year)
Ideally, the structure of the output I thought should be like the following (but I am open to different views, as long I get to the result): flag with 1 those customers who have visited the same park in two different years.
Create a calculated field called customer_park_years =
{ fixed [Customerid], [Park] : countd([year]) }
You can use that on the filter shelf to only include data for customer_park_years >= 2
Then you will be able to visualize only the data related to those customers visiting specific parks that they visited in multiple years. If you also want to then look at their behavior at other parks, you'll have to adjust your approach instead of just simply filtering out the other data. Changes depend on the details of your question.
But to answer your specific question, this should be an easy way to go.
Note that countd() can be slow for very large data sets, but it makes answering questions without reshaping your data easy, so its often a good tradeoff.
Try this !
IFNULL(str({fixed [Customerid],[Park]:IF sum(1)>1 then 1 ELSE 0 END}),'0')

Creating relationship between two different columns- a relationship that effects other values

I'm going to try and make this as least confusing as possible, I apologize in advance if my attempt is a failure.
I work in education and am trying to create a predictive analysis document that will tell us how many class sections we will need to offer in a given semester.
I pulled data from the past five years and consolidated it into a pivot chart. I set the pivot chart to combine all courses with a common Subject, Course Title and Catalog Number (See image below for more detail), and output 3 different columns of values based on what we need.
The problem I am facing now is with curriculum changes throughout the years. There are some courses within the list that are no longer being offered and a new course with a new Course Title, Subject and Catalog Number that can now be substituted for the previously needed course. Since the data has been pulled into one pivot chart, both the old curriculum courses and the new curriculum courses are in one list.
I would like to somehow create a relationship between the old curriculum courses and the new curriculum courses. If possible I would like the names of the courses to remain separate, but the values of the old and new to be averaged out together in their respective rows.
In a new page, I plan on putting an easy to use form where the user can select a course subject and name, enter in some other necessary data and the document will output the amount of course sections needed.
Does anyone know of a way to make a relationship between two cells and have other cells effected by this relationship?
Thanks so much!
Mike
enter image description here

Pros and cons of two types of PivotTables for BI purposes

I am trying to figure out how to create the most useful PivotTable for a user to view data for BI purposes. Here are two options I was considerating:
(1) Traditional PivotTable, pivot values on top:
(2) Drill-down type PivotTable:
What are the pros and cons of each method? For example, one for each to start might be:
Drilldown
PRO: trivial to add additional drilldown variables.
Pivot:
PRO: can easily sort by the column headers in the table UI.
And, are there any other possible tabular displays of data, either another type of PivotTable or another type altogether?
I'll suggest to keep it simple. If the objective is to present a view of the revenue figures of each region summarized by gender then pivot table in option 1 is the most effective of both, as it shows everything relevant in one simple look, keeping similar data at the same level making easier to compare.
Bear in mind that management requested that view to be able to effectively see how each region is performing on that specific category.
If the focus is revenue by different gender. Option 1 shows that in same row continuously for each region. It can easily be seen that the best performer on revenue generated by females is US, while best performer on revenue generated by males is Canada. While is not easy to see that in option 2.
If the focus is revenue by same gender. Option 1 shows that in same column continuously, which is not the case with option two.
Option 2 will be useful if the primary focus is set on revenue by region then if there is a need to see additional details based on the performance of any region management can drilldown to see the details of what makes the primary number. Which in this case is not the objective as the request is to show both.
Also best advice is to always agree requirements with clients (internal and/or external) you might find that they might have requested only what they believe it is possible to achieve and after they have that they will apply some "manual steps" to achieve their ultimate goal, something you could have done entirely if only you would have known.
Pivot Tables are used to -
summarize data
analyze data
explore data
present summary data
Both ways (traditional and drill down) of Pivot table can do the above listed.
It depends on what you want to achieve in BI.
If detailed data is not required to show or sort then you can use drill down.
Mostly in BI, data used in summarised form. So Drill down method will be good for display of data. Anyways you can double click and see the detailed data. See how to get details of drill
Drill Down:
a. Pros
Summarise Easily
Add sub points for summary
"Get Details" of Pivot for more details
b. Cons
The way you are doing sorting by pivot is not possible. Instead I would suggest to use pivot to drill down. So you can sort (And will move to Pros section :P) and check pivot details in another form.
Traditional Way
This way you are making to use pivot tables of your data. You should explore more in given links below.
5 pivot tables you probably haven't seen before
pivot tables save your job
23 things you should know about Excel pivot tables
Generally every representation of data has a purpose and with this purpose there come certain advantages and disadvantages.
Obviously with any kind of report, the audience matters most. Which would put you in the classical Requirement Analysis situation where you need to figure out what your customer wants (What data is of interest? How should it be sliced? What medium is it consumed on?)
Is the Revenue by Gender an important KPI?
If it is not, why including it at all?
If it is, let's see what a potential reader would do to answer a question like "How does the womens sale for Mexico compare with Canada?"
Drill down table:
Understanding the table will take a couple of second since they have to understand the different levels and their representation, the meaning of the bold and regular lines and realize that the man and women values accumulate to the total value for a region
Find Mexico in the list
Find the row for women and the value of it on the right
Find Canada in the list
Find the row for women and the value of it on the right
Remember the the value for Mexico or look it up again
Important here is also that this process will be repeated more or less exactly for every follow up question.
Traditional table
Understanding the table will be faster, they see a country name on the left and male/female on the top. Generally people are used to these tables since primary school and won't need further explanation.
Find Mexico in the list, go to the right until they find the value for women (if you try it you will see that you automatically see the values and the heading)
Find Canada in the list, (realize that it is only one line above) go to the right and have both values on top of each other.
For all the following questions the structure is easy to remember and it's a find and match game between rows and columns
I know that might be a bit subjective, but I hope the general idea is understandable
If you know have a question like "In which region do we sell more to men than women?" the advantage of a traditional over a drill down table becomes even more obvious.
With the drill down you will have to juggle several rows and their values while with the traditional you just skim through one column and look for the biggest value.
Is the Revenue per Region the main KPI?
You should then rather use a drill down table, possibly with additional levels (ie. North America in case it's international data or US State since I would assume it would be of interest if your product sells better in Alaska than Florida).
Your audience can then decide which granularity they want to see and adjust it accordingly. The gender is on the bottom of the hierarchy so either you have curious people who are interested in just another figure or they don't care and just don't drill down that deep.
The assumption here is that you deliver the table on the highest aggregate level.
One could argue that the same problem of finding row etc. exists as well for this case but I would assume you wouldn't necessarily compare the sales for Yucatán with Alberta so you stay in one group of states for example and again just have to skim up or down to find the states of the same country so you can compare it.
Using drilldowns in pivot tables is, in my opinion, a tool to be used by analysts, and not managers. Pivot tables are not quite intuitive enough to be used on reports that are being sent on for BI review by management. Typically any report which is being circulated for review by the powers that be should be consistent from user to user. That means using drilldowns would display different numbers if different items are selected - which could lead to 2 people talking about different values without knowing it.
Many people in management level positions outside of the core analytical group will still print anything you e-mail them before they look at it. I suspect that this is more likely to be true in a less technologically advanced company (ie: one which uses Excel as its database analysis tool instead of a full ERP-type system). In either case, anything being submitted for high level review should already be formatted exactly as you want them to see it.
The key in Excel deliverables within the workbplace is to make review as easy as possible. That means all necessary information should be immediately visible on each tab, with a minimum of scrolling (maybe scrolling down if necessary, but never scrolling right), and absolutely no clicking required.
Conclusion - Do not force a reviewer to manipulate your Excel file to use it
You may like drilldowns because you see how powerful it is to adjust reports as you are analyzing data - but once you have made your own analytical conclusions, those conclusions should be immediately apperent from the visible workspace that you leave for review.
Therefore, in order to achieve simplicity in high level review documents, you should use the 'traditional' format as you have shown it, which shows all numbers next to eachother in an easy to read table.

Resources