Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
junyuchew
Frequent Visitor

How to populate values from a table with specified dates to another table with all dates

Hi,

 

I have a table with ProductID and DateID, along with True/False column at specified dates that i would like to populate to another table. Note: There are more than 1000 unique products in the actual tables

 

ProductIDDateID 
4120170501FALSE
4120170801FALSE
4120171101TRUE
4120180101TRUE
4120180601TRUE
10020170401FALSE
10020170801FALSE
10020171101FALSE
10020180201TRUE
10020180501TRUE

 

The other table contains all dates from 20170101 to 20181231, along with their respective ProductID. I want to populate True/False on all DateIDs based on the information above. For example, Product 41 from 20170101 to 20171031 should be False, while 20171101 onwards should be TRUE. Is this possible?

 

 Sample of Table

ProductIDDateid Desired column
4120171024FALSE
4120171025FALSE
4120171026FALSE
4120171027FALSE
4120171028FALSE
4120171029FALSE
4120171030FALSE
4120171031FALSE
4120171101TRUE
4120171102TRUE
4120171103TRUE
4120171104TRUE
4120171105TRUE
4120171106TRUE
4120171107TRUE
4120170116TRUE
4120170117TRUE
4120170118TRUE

.

.

.

 

Thank you!

3 REPLIES 3
ryan_mayu
Super User
Super User

Hi,

 

I suggest you to create a unique column in both table which is ID&date. Then you can go to Edit Quires-> Merge Queries to import the column from the second table to first if the values in unique column are matching.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi Ryan,

 

Pardon my phrasing, but I think you misunderstood me. The "desired column" in the second table does not exist. I would like to create a formula to get the "desired column". My second table only has ProductID and DateID but i want to obtain True/False to each row of dates based on information on the first table.

 

I did some research, but it seems that you can do this using the Complete function in R. Not sure how it can be done in DAX

I think the same way which is to create a unique column and import the value from table A to tabel B (or table B to table A) which has the same values of unique columns.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.