Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
I have a table with a column with missing values, I want to fill those missing values with a column in another table.
I created this sample data as an example (sample_data.pbix) :
Table A
date | value_A |
Friday, 13 September, 2024 | 1623 |
Sunday, 15 September, 2024 | 9584 |
Table B
date | value_B |
Friday, 13 September, 2024 | 5483 |
Saturday, 14 September, 2024 | 9084 |
Sunday, 15 September, 2024 | 1234 |
dates
date | week_id |
Friday, 13 September, 2024 | 37 |
Saturday, 14 September, 2024 | 37 |
Sunday, 15 September, 2024 | 38 |
The relationship between the tables are as follows using "date" as the key between them.
what I need to do is create a column with the values of column "value_A" from Table A, and fill the missing values (in this case the value for September 14th) with the values of "value_B". In this case, the column should have the values: 1623, 9084, 9584, for each date respectively.
I'm not really sure how to determine when a row in Table A doesn't exist. Table dates has the complete set of dates but I should leave that table intact. Table B may or may not have all the values, so I should leave a 0 if both Table A and Table B don't have that particular date.
Does anyone have directions for me to achieve this?
Thanks in advance.
Solved! Go to Solution.
Read about COALESCE
Perfection.
Thank you!
Edit:
The subtotals looks off, it show the same value as value_A. I'll play with it a bit more and see how it works.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
77 | |
76 | |
69 | |
48 | |
40 |
User | Count |
---|---|
62 | |
41 | |
33 | |
30 | |
29 |