Forum Discussion
DairyG1
3 years agoHelper I
Pass fail measure based on different date fields
Hi All, Novice in power query,hope i can get some advise. I need to calculate pass/fail for different document types based off different date fields. if doc type equals invoice and invoice ...
- 3 years ago
Hi DairyG1
Can you provide some sample data and expected result? If you have columns similar to below, you can add a custom column with code similar to below:
if [Doc Type] = "Invoice" and [Invoice Date] < [Creation Date] then "Fail" else if [Doc Type] = "PL" and [Departure Date] < [Creation Date] then "Fail" else "Pass"Reference: Power Query If statement: nested ifs & multiple conditions (exceloffthegrid.com)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
v-jingzhang
3 years agoCommunity Support
Hi DairyG1
Can you provide some sample data and expected result? If you have columns similar to below, you can add a custom column with code similar to below:
if [Doc Type] = "Invoice" and [Invoice Date] < [Creation Date] then "Fail" else if [Doc Type] = "PL" and [Departure Date] < [Creation Date] then "Fail" else "Pass"
Reference: Power Query If statement: nested ifs & multiple conditions (exceloffthegrid.com)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.