Forum Discussion
grggmrtn
Post Patron
6 years agoCalculating MIN(Date) with data from three different tables...
I have three tables: Fact_Keys, Dim_Details, Dim_Dates Fact_Keys has key columns to the two dimension tables: SK_Details and SK_Date. Dim_Details has columns SK_Details, ServiceID, ServiceStatus, B...
grggmrtn
Post Patron
6 years agoHmm, this actually looks like is almost works. The resulting format is a bit off though, with some of the results looking like 20160105 (aka january 5, 2016) and others looking like 42374, 2958465, 42375.... The new column has a decimal datatype and changing it only brings error (system format exception)...
Maybe because your code doesn't refer to DIM_Date[Date] at all? The output is the key, not the date itself...
amitchandak
Super User
6 years agoGet the min date in the column. Get its date using another formula from date table and compare it with min dates and then again apply for logic get BackupDate