Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am slowly learning Power Query M, but I've gone down a rabbit hole and neeed some help to correct my thinking please! I need to return a column that provides a single date from multiple date fields, based on a heirarchy.
The plain language version is:
If the [assignment.scheduledate] date field is not empty, return this date, unless the [schedstart] field has a date and this date is greater than the [assignment.scheduledate].
If the [assigment.schedule] date is not empty then return the [schedstart] date field.
If the assignment.schedule date and the schedstart date fields are both empty, return the targstartdate field.
I've tried many variations of the below, but cannot seem to get an error in the results when there is an [assignment.scheduledate] . Any help would be very much appreciated!
if [assignment.scheduledate] <> null and ([assignment.scheduledate] >= [shedstart]) then [assignment.scheduledate] else
if [assignment.scheduledate] <> null and ([assignment.scheduledate] < [shedstart]) then [schedstart] else
if [assignment.scheduledate] is null and [schedstart] <> null then [schedstart] else
if [assignment.scheduledate] is null and [schedstart] is null then [targstartdate] else null)
Hi @NZCraig ,
What is your error information of above expression? I think you need to delete the ")" at the end of expression. In addition, if possible, could you please inform me more detailed information(such as your expected output and your sample data (by OneDrive for Business))? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |