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.
I have a few null values in column A " Month (End Date)" and Column B ("Year (End Date)" that I want to replace with values from Column C (Month ("Approved Date)") and Column D ("Year (Approved Date)"). In excel I just need to do a =formula and done but not sure how to code it in DAX to do this. Does anyone know the answer?
Solved! Go to Solution.
You can do this in Power Query pretty easily by adding a custom column with the following code:
if Month[End Date] = null then Month [Approved Date] else Month [End Date]
This will create a column that has no nulls and either the Month Approved Date or the Month End Date. You then can remove both the End Date and Approved date columns if you want.
Just repeat for the Year End column
You can do this in Power Query pretty easily by adding a custom column with the following code:
if Month[End Date] = null then Month [Approved Date] else Month [End Date]
This will create a column that has no nulls and either the Month Approved Date or the Month End Date. You then can remove both the End Date and Approved date columns if you want.
Just repeat for the Year End column
Hi,
Is there a solution for this same formula, but for direct query?
Many thanks
Thank you so much! I have wasted hours trying to find the solution.
User | Count |
---|---|
73 | |
70 | |
38 | |
24 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
41 | |
40 |