Forum Discussion
Calculating MIN(Date) with data from three different tables...
You should able to create a new column in service table and can get data from other tables like the example given below
New column in Table 1 = maxx(filter(table2,table1[customer] = table2[customer] && table2[option]="construction",table2[value])
New column in Table 1 = maxx(filter(table2,table1[Attribute] = table2[name] && table1[project] = table2[project],table[name])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
I'm sorry amitchandak but I can't quite figure out what you're trying to tell me. The names you use in your example aren't the ones I gave in my description, and you refer to two tables while I spoke of three?
- amitchandak6 years ago
Super User
Try a new column in Dim_Details
StartDate = if( minx(filter(Fact_Keys, Fact_Keys[SK_Details]=Dim_Details[SK_Details]),Fact_Keys['SK_Date']) <date(2015,01,01) ,Dim_Details [BackupDate],minx(filter(Fact_Keys, Fact_Keys[SK_Details]=Dim_Details[SK_Details]),Fact_Keys['SK_Date']) )- grggmrtn6 years ago
Post Patron
Hmm, 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...
- amitchandak6 years ago
Super User
Get 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