This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
I have status cloumn that has the status of each rpocess I review on monthly basis. however, since we are in the begining of the year, the status would result to NULL because the relvant processes have not been yet submitted either because they are late or because it is not due yet. Therefore, I was trying to make the culumn replace the NULL based on the current month, where if the table shows the current month and it was empty it should replacle it to "Not submitted yet" otherwise it should return it as "Not due yet".
When trying thre below formua the synatx is right, but it return in Error
I would appreciate the support to fix this.
if[Request Status] = "" and [#"Month - Date"] = Date.IsInCurrentMonth then [Request Status] = "Not submitted" else [Request Status] = "Not due yet"
Solved! Go to Solution.
Hi @Anonymous ,
Without seeing an example of your table I can't be sure that what you are trying to do is actually correct, but I think your formula should read like this:
// Add this as a new CUSTOM COLUMN
if [Request Status] <> null then [Request Status]
else if [Request Status] = null and Date.IsInCurrentMonth([#"Month - Date"]) then "Not Submitted"
else "Not due yet"
You're mixing up functions in your formula by trying to set the value of [Request Status] to your output text.
The formula above will create a new column containing your desired output.
If you want this to replace values in the [Request Status] column, you will need to use Table.ReplaceValue in a custom step, something like this:
// Add this as a CUSTOM STEP
= Table.ReplaceValue(
previousStepName,
each [Request Status],
each if [Request Status] <> null then [Request Status]
else if [Request Status] = null and Date.IsInCurrentMonth([#"Month - Date"]) then "Not Submitted"
else "Not due yet",
Replacer.ReplaceText,{"Request Status"}
)
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
Without seeing an example of your table I can't be sure that what you are trying to do is actually correct, but I think your formula should read like this:
// Add this as a new CUSTOM COLUMN
if [Request Status] <> null then [Request Status]
else if [Request Status] = null and Date.IsInCurrentMonth([#"Month - Date"]) then "Not Submitted"
else "Not due yet"
You're mixing up functions in your formula by trying to set the value of [Request Status] to your output text.
The formula above will create a new column containing your desired output.
If you want this to replace values in the [Request Status] column, you will need to use Table.ReplaceValue in a custom step, something like this:
// Add this as a CUSTOM STEP
= Table.ReplaceValue(
previousStepName,
each [Request Status],
each if [Request Status] <> null then [Request Status]
else if [Request Status] = null and Date.IsInCurrentMonth([#"Month - Date"]) then "Not Submitted"
else "Not due yet",
Replacer.ReplaceText,{"Request Status"}
)
Pete
Proud to be a Datanaut!
I want to replace the blank cells in Request status with wither Not submitted or not due based on the current month.
I hope it is clear and thanks for the support.
Hi @Anonymous ,
I explained how to do this in my post.
Let me know which bit you are getting stuck at and I'll help you through it.
Pete
Proud to be a Datanaut!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.