Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello.
I would like to update a custom column with data from a different table.
I have a list of zipcodes with program start dates in one table called DateBeginFootprintZips.
I would like to create a new column in a separate table, iPad_CPM with the BeginDate from DateBeginFootprintZips where the zipcodes match. For the records in iPad_CPM table that have zips that are not in the first, I would like to update that date to the next day after the max date in DateBeginFootprintZips.
For example, if the zip in my 2nd table is 30014, I want the new column to have a date of 8/1/2022. But, if the zip in iPad_CPM is 30012, which is not in the DateBeginFootprintZips table, it should be 8/2/2022, as 8/1/2022 is the Max date.
Any help would be very much appreciated.
Solved! Go to Solution.
@Anonymous Oh, I missed the +1. I'm not sure how much further I can take this without you posting some sample data and expected output because I'm already starting to get confused.
Column =
VAR __zip = [zipcode]
VAR __Table = FILTER('DateBeginFootprintZips',[Zipcode] = __zip)
RETURN
IF(COUNTROWS(__Table)+0 = 0, MAX('DateBeginFootprintZips'[DateBegin])+1, MAXX(__Table,[DateBegin]))
@Anonymous Maybe:
Column =
VAR __zip = [zipcode]
VAR __Table = FILTER('DateBeginFootprintZips',[Zipcode] = __zip)
RETURN
IF(COUNTROWS(__Table)+0 = 0, MAX('DateBeginFootprintZips'[DateBegin]), MAXX(__Table,[DateBegin]))
Hi Greg,
Thanks for this. Certainly on the right track. The start date of 6/6 and 6/13 are only assigned to the corresponding zipcodes. However, all other zipcodes are assigned to the 8/1 date. How do I update so that just the corresponding zipcodes are assigned the 8/1, leaving all other zipcodes with no current start date to be assigned 8/2 (Max BeginDate + 1 one day)?
@Anonymous Oh, I missed the +1. I'm not sure how much further I can take this without you posting some sample data and expected output because I'm already starting to get confused.
Column =
VAR __zip = [zipcode]
VAR __Table = FILTER('DateBeginFootprintZips',[Zipcode] = __zip)
RETURN
IF(COUNTROWS(__Table)+0 = 0, MAX('DateBeginFootprintZips'[DateBegin])+1, MAXX(__Table,[DateBegin]))
Thanks Super User Greg!