Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
ProductID | DateID | |
41 | 20170501 | FALSE |
41 | 20170801 | FALSE |
41 | 20171101 | TRUE |
41 | 20180101 | TRUE |
41 | 20180601 | TRUE |
100 | 20170401 | FALSE |
100 | 20170801 | FALSE |
100 | 20171101 | FALSE |
100 | 20180201 | TRUE |
100 | 20180501 | TRUE |
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
ProductID | Dateid | Desired column |
41 | 20171024 | FALSE |
41 | 20171025 | FALSE |
41 | 20171026 | FALSE |
41 | 20171027 | FALSE |
41 | 20171028 | FALSE |
41 | 20171029 | FALSE |
41 | 20171030 | FALSE |
41 | 20171031 | FALSE |
41 | 20171101 | TRUE |
41 | 20171102 | TRUE |
41 | 20171103 | TRUE |
41 | 20171104 | TRUE |
41 | 20171105 | TRUE |
41 | 20171106 | TRUE |
41 | 20171107 | TRUE |
41 | 20170116 | TRUE |
41 | 20170117 | TRUE |
41 | 20170118 | TRUE |
.
.
.
Thank you!
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.
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.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |