- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Expression error
I am using the following to establish a new conditional column in Power Query:
= Table.AddColumn(#"Filtered Rows3", "LC19", each
if[FY18]= #date(2017, 7, 1) and [FY19] = #date(2018, 7, 1) then "Retained"
else
if[FY19]= #date(2018, 7, 1) and [First Gift Date]>= #date(2018, 7, 1) then "New"
else
if[FY18]= #date(null) and [FY19]= #date(2018, 7, 1) and [First Gift Date]<= #date(2017, 6,30) then "Reactived"
else "N/A")
And I keep receiving the folowing Expression.Error: 1 arguments were passed to a function which expects 3.
Details:
Pattern=
Arguments=[List]
All the referenced columns are formatted as type Date - what am I missing?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To explain further, your error message is because:
#date(year, month, day) requires three arguments.
#date(null) has only one argument
Of course, #date(null,null,null) would also be invalid as the arguments for #date(...) need to be of type number and each within a certain range of numbers, and null cannot be converted to a number.
As others have pointed out, you can just use if [FY18]=null ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nspiler, Thanks for reaching out ot MS fabric community support.
@ronrsnfld, @Omid_Motamedise, @rohit1991, @Fowmy Thanks for your promt response. @Nspiler Can you please confirm whether solution provided by our super worked for you? please let us know if you need further assistance.
Your feedback is important to us, Looking forward to your response.
Thanks,
Prashanth Are
MS fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To explain further, your error message is because:
#date(year, month, day) requires three arguments.
#date(null) has only one argument
Of course, #date(null,null,null) would also be invalid as the arguments for #date(...) need to be of type number and each within a certain range of numbers, and null cannot be converted to a number.
As others have pointed out, you can just use if [FY18]=null ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Instead of using
if[FY18]= #date(null)
Use
if[FY18]= null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your issue is caused by using #date(null), which is invalid. Replace it with null for null checks. Here's the corrected code:
= Table.AddColumn(#"Filtered Rows3", "LC19", each
if [FY18] = #date(2017, 7, 1) and [FY19] = #date(2018, 7, 1) then "Retained"
else if [FY19] = #date(2018, 7, 1) and [First Gift Date] >= #date(2018, 7, 1) then "New"
else if [FY18] = null and [FY19] = #date(2018, 7, 1) and [First Gift Date] <= #date(2017, 6, 30) then "Reactivated"
else "N/A"
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nspiler
in the following line, you have used #date(null) which is not acceptable, try this way
if [FY18]= null and [FY19]= #date(2018, 7, 1) and [First Gift Date]<= #date(2017, 6,30) then "Reactived"
You may try [FY18]= "" also
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
05-31-2024 01:21 PM | |||
12-30-2024 01:35 PM | |||
06-05-2024 02:19 AM | |||
03-05-2024 05:13 AM | |||
01-20-2023 07:52 AM |
User | Count |
---|---|
25 | |
24 | |
18 | |
17 | |
15 |