Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |