I have 2 date fields in my fact table start_date and end_date.
Fact table is connected to the dim date with start_date.
I need to slice data by the second date field so I've created another date dimension similar to the first dim date and connected the key to the end_date in the fact table, but for some reason there's no relation between them when I browse the cube.
I made sure the keys are in the same format, data type etc.
The new dim date is 'marked as date table'.
What am I missing?
Thanks a lot.
Try with TabularEditor:
https://github.com/otykier/TabularEditor/releases/tag/2.13.0
open your Model and check relationships if you don't see the one you want, you can just add a new one.
You can also create multiple relationships to the same table using different columns (but as inactive), you can use this inactive relationship in calculation using USERELATIONSHIP.
Related
Need help to create a formula in crystal syntax(Crystal reports) to calculate number of days between two dates from WO_DATE.WO_DATE (WO = work order) where WO_DATE_TYPE.WO_DATE_TYPE_DESC = "START" and WO_DATE_TYPE.WO_DATE_TYPE_DESC = "Due".
Below is my DB Schema
In Crystal's database expert, add the WO_Date table twice. The 2nd instance would require an Alias (a different name).
Join to require the Work_Order_ID be the same across the two instances.
In the record selection formula, force the first instance to be the START type.
Similarly, force the second instance to be the END type.
Now, simply subtract the date in the first table instance from the date in the second table instance.
I am trying to link two different tables by date. table 1: Date is a date and time field table 2: Date is a date field
I am using Crystal report 11 and in the report options; converting to the date field is not an option
Can't do such a join in Crystal.
Consider creating a View in the DBMS to take care of converting the data type in one of these tables.
Other options:
No join but use a record selection condition. Performance would suffer but if number of records is not too large that should work.
Use a Command.
Use one table in the main report and link to the other via a subreport link.
I'm trying to find a way to create a table like the one above, but instead of having columns of months I would like to have columns of MTD, QTD, YTD for all selected measure values. I created calculated fields on the [Date] field but when I try to use that it still splits the data in to separate columns of months and quarters... I'm using two data sources and they are linked on the [Date] field. If I try to put two of my calculated fields in the columns bar it just combines them like 'MTD/YTD'. How can I get them to display as separate columns?
I know this is strange because there will be overlapping data (everything in the MTD will also be in the QTD and the YTD).
I found a way to do this. I created a calculated field on the date field and assigned 'MTD' to all records from the last month. Then I assigned 'QTD' to all records from the start of the quarter to the day before the start date of the 'MTD' records. Then I assigned 'YTD' to all records from the start of the year to the day before the start of the 'QTD' records. (this way there are no overlapping records).
After that I just did a quick table calc to make each of them a 'running total' table (across).
I created parameters for the dates so the can easily be updated.
I'm in the process of formatting a database and have found a column I'd like to format. It has 3 types of information for every record in the column. For example, a record in my history column shows as (American, born Estonia. 19011974). What I want to do is put this data into new individual columns to make them atomic. I want to extract data such as 'American' into a country column, 'Estonia' into a born column and '1901' into a born column and '1974' into a death column. UPDATE: However, some of the columns hold nullls, for example, another record in the same column might be (German, 19242004), so a normal regular expression wouldn't work for all data would it? Any help is appreciated!
What PostgreSQL statements would I use to obtain specific parts of this data from the individual records? I understand it would be insert and have already came up with:
INSERT INTO historian (id,url)
SELECT object_id, url FROM maintable;
that statement allowed me to get those values into new columns, but those were atomic already so I could easily transition them. Thanks for any help! :)
I have issue trying to filter in excel 2010 pivot table on date attributes from a Cube source.
My problem is i have Date attributes in NONE date dimensions my example is a Asset Dimension that has a set of date attributes like:
Bought date
Sold Date
Repair Date
Is there a way to set these attributes to type date so pivot table will directly identify them and allow use of Date Filters ?
Or do i have to create a Date dimension for each attribute and user will have to select which Dimension he wants to slice data by
One option is to add an additional date "role-playing" dimension to the cube (e.g. DimAssetBoughtDate) and hang it off the fact tables using a reference-relationship through the Asset dimension. This not only provides you with the date-based filtering but also all of the built in hierarchies. Plus date dims are usually pretty small so materializing the relationship shouldn't be an issue.
Note: you may need to add a calculated member to your Asset dimension in your DSV to convert the date value (e.g. AssetBoughtDate 3/12/2015) to the date-key value (e.g. AssetBoughtDateKey 20150312) in order to properly add the new DimAssetBoughtDate.