Why does icCube require Data Table for a time dimension - olap-cube

The documentation states (the words in brackets are mine):
[A time wizard dimension] allows us to define/generate a time
dimension without any underlying data table.
The accompanying image in the documentation does not show a field for entering a data table. However, when I look at the definition of the Time dimension in the demo Sales cube (version 6.5 of icCube), I see that a data table is in fact used. Also, there is no option in the drop-down menu to not specify a table. So, it becomes not clear what is special about the time dimension. What am I missing?

In icCube there is nothing really special about a "time" dimension.
However, you can define a time dimension as any other dimension using a table or using the "time wizard" that is going to generate days between the specified from and to dates (therefore no need of table).
The demo Sales schema is defining a time dimension using a table.
In its definition, a dimension is flagged as time (and possibly default time dimension) because it can be used as the default rollup hierarchy with custom aggregation (e.g., open non empty).
Note that several MDX functions (e.g., parallelPeriod, dtXyz) allows for navigating a time dimension in quite a specific way.

Related

How do I group dates in IBM COGNOS when building a front end dashboard

I am an extreme newbie to COGNOS (5 days give or take a few hrs) and have been thrown in the deep end.
I have a data package i am working with and the only date field I can use has the property of timestamp. I have looked through other questions that are similar and i have used the "CAST" function to turn the field into a date so this has worked.
cast ( [TR_Logical Layer].[Fact Event].[Period Datetime],DATE) - so I was happy with that.
However now when I am building the graph, I am getting repeated dates - and I can only think that this is because somehow it is still holding onto the timestamp portion of the field.
Please how can i get all of my many dates for say the 21st Jul to be one?
Possible issue: Repeating is probably due to how it is grouped (down to the time which would have the day repeating)
Suggested solution: Add a determinant to control granularity and grouping
Here are the steps
https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=determinants-specifying
Click the query subject you want, and click Actions, Edit Definition.
Click the Determinants tab.
Click Add under the Determinants box.
The entry New Determinant displays in the box. To give this entry a meaningful name, right-click it, and click Rename.
To define a key, right-click a query item in the Available items box and click Add as Key. Tip: You can also drag query items to the Key box.
To identify which query items should be associated with this determinant, right-click query items in the Available items box, and click Add as Attributes.
Tip: You can also drag query items to the Attributes box.
You can have a determinant with no attributes defined for it. Framework Manager uses this type of determinant to indicate which query items are indexed.
To specify that the selected determinant should be used as the unique identifier, select the Uniquely Identified check box.
Do this only if the data in this item is unique for every row in the underlying data source. You can specify more than one unique determinant if they are truly unique. At query time, the relationship being used will determine which unique determinant to use.
Select the Group By check box to indicate that when keys or attributes associated with that determinant are repeated in the data, IBM® Cognos® Analytics should apply aggregate functions and grouping to avoid double-counting.
If you want to change the order of the determinants, use the arrow buttons.
Determinants are processed in the order in which they are specified in the model.
Click OK

How can I create filters on a series of tables where the final table yields a single data observation?

I am creating an interactive 'calculator' using tableau. I have a series of dataframes that I have crossed with one another, such that the resulting dataframe is every possible combination between the tables, and every row is unique.
Each column is its own worksheet as a table. Each table in the dashboard is a pane. So, here we have a series of tables with selectable units of measurement, and the final pane on the dashboard should filter to the cell for its respective column, on the unique row of the dataset that the user has selected and 'filtered out'.
I'm having some issues getting this to work and not sure why.
The closest I can think to solving this would be 'Cascading Filters.' Here are a couple resources:
General Use
In dashboard action-filter form
The critical piece, however, is that the filters must be selected in a specific order - therefore making them 'cascading.' This may differ from your presumed concept of clicking/filtering in any order on the worksheets to then arrive to a final answer. I do think that this may be a limitation of Tableau - I don't think that a 'many to many' type of relationship can be set up within Action Filters.

Metric showing higher value in blended data when date range comparison is added

I have two data sources in Google cloud storage buckets. I am blending them in Google data studio as follows:
I have created a simple table chart which is working fine:
But when I set Comparison date range option to Previous period, the cost numbers displayed in the same table go haywire but the summary row which displays the total cost is fine. I don't observe this issue if the data is not blended.
When you enable "Comparison data range" it only show comparable data (that means, data that can be comparable with something).
Since your data source probably contains rows of a dates that doesn't have a relative row to compare with (the previous period), that data is filtered out from your visualization.

tableau show categories from calculation even when a category is not visible

I have a calculation and it outputs multiple values. Then I am creating a table on those values. For example, in below data my formula is
if data is 1 then calculation is `one`
if data is 2 then calculation is `two`
if data is 3 then calculation is `three`
as three doesn't really appear in the output, when I create a table, three is not displayed. Is there any way to display it?
I tried table layout >> show empty rows and columns and it didn't work
data calculation
1 one
2 two
Tableau discovers the possible values for a dimension field dynamically from the query results.
If ‘three’ does not appear in your data, then how do you expect Tableau to know to make a column header for that non existent, but potential, value? It can’t read your mind.
This situation does occur often though - perhaps you want row or column headers to remain stable, even when you change filters in a way that causes some to no longer appear in the query results.
There are a few ways you can force Tableau to pad ** or **complete a domain:
one solution is to pad your data to make sure each value for your dimension field appears in at least one data row.
You can often do this easily by using a union to append some extra rows to your original data. You can often add padding rows that don’t impact any results by leaving all your Measure columns null since nulls are ignored by aggregation functions
Another common solution that is a bit more effort is to make what is known as scaffolding data source that is not much more than a list of your dimension members. You can then use that data source as a primary data source with data blending, making your original data source secondary.
There are two situations where Tableau can detect the absence of data and leave space for it in the visualization automatically
for numeric types, you can create a bin field that will automatically pad for missing bins
similarly, date fields can show missing values because, like bins, Tableau can tell when a month doesn’t appear in the data and leave room for it in the view

How to Browse MS Olap cube in Excel NOT using Pivot Table

Suppose you have a 2 dimensions cube (Units Sold) in MS Olap. Dim 1 is Product and Dim 2 is Country. In the 'Units sold' MS olap cube the cell having the coordinate ('Car', 'France') have a value (says '123').
If I set up a Pivot Table in Excel, the cell with reference ('Car', France') may show a complete different number (depending of the filters ... of course). Is there a way to have still the right number ('123') : the ideal is to have both : the filtered and the one ('123') from MS Olap.
Think 'Hide' (discrete items) instead of 'Filter' when you tick/untick items in a filter.
What you're trying to do is use one measure to do two things at the same time. Which you can't do straight off the bat. However, there are workarounds.
These are all local to Excel only (not server side) as I'm assuming it's only for you. First solution is obvious, second is better, third and fourth use an extension (fourth is my preferred method as it avoids horrendous MDX code).
1. Second Pivot Table
Create a second pivot table. First pivot table filtered by Product, Country and second pivot table by other criteria AND Product, Country. You can link the pivot tables with a slicer to choose different values for Product, Country.
2. CUBE formulas in Excel sheet cells
You don't actually need to use pivot tables to access cubes (depending on the implementation).
=CUBEVALUE("Sales","[Measures].[Profit]","[Time].[2004]","[All Product].[Beverages]")`
These CUBEVALUE formulae are based off the MDX code that goes into the Microsoft Analysis Server implementation. It goes like this:
=CUBEVALUE("CUBE NAME","[Measure Group].[Measure]","[Dimension].[Attribute]","[Dimension].[Attribute]")
You can add in whatever dimensions/attributes you want then.
3. Use the OLAP PivotTable Extension.
This allows you to create your own custom measure for individual pivot tables. Once again, using MDX. I believe you can do a similar thing like with the Cubevalue formulas - i.e. add in whatever dimensions/attributes you want on top of whatever will be filtered.
https://olappivottableextend.codeplex.com/
4. DAX Studio
DAX is the query language that powers PowerPivot. DAX studio allows you to connect to PowerPivot models and run queries - similar to SQL but just using a different language..
DAX studio allows you to connect to OLAP Cubes too. So you can perform queries against a Cube, then export it as a txt file, linked table in excel etc.
https://daxstudio.codeplex.com/
If what you'll be doing is basic, you could probably get away with 1 or 2.
However, I do highly suggest you take a look at the OLAP PivotTable Extension anyway. It has a feature which allows you to paste a list of values to filter by - instead of having to manually tick them all.
Saved me hours of woe!