Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am trying to work on a formula, but it isnt working out.
The column Approved Date has data with Dates and some without Dates (blank)
I would like to put in a formula mentioning , if its blank then the column should return Not Approved
if [Approval Date] = null then "Not Approved" else "Approved"
Solved! Go to Solution.
Hello @Anonymous
there is definitly a null in your column if the cell is empty. So I checked it against "null" and it works perfectly fine
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hi @amitchandak and @Jimmy801
Tried both the methods, the below is the screenshot, I checked the cell, it has only date and the type is selected as date.
Hello @Anonymous
last two tries 🙂
if Text.Clean(Text.Trim([Approval Date])) = "" then "Not Approved" else "Approved"
if Value.Is([Approval Date],type datetime) = true then "Approved" else "Not approved"
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @Anonymous
could you upload the file to some sharing site and share the link here, then I can check it
Jimmy
Hi @Jimmy801
The file in the below link. I have given the column names with the ones we discussed here.
https://drive.google.com/file/d/1wydE7mu23l2VHmvXyIBn5MyWQoW7Thhu/view?usp=sharing
Hello @Anonymous
there is definitly a null in your column if the cell is empty. So I checked it against "null" and it works perfectly fine
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
I just changed the "" and changed it to null and its working
Hello @Anonymous
the formula is perfectly fine. However I think your values are not containing null but "" instead
Try to change your formula to:
if [Approval Date] = "" then "Not Approved" else "Approved"
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
@Anonymous ,
Try like
if Text.Trim([Approval Date]) = "" then "Not Approved" else "Approved"
You can add or [Approval Date] = null
Hello @Anonymous
check your cell content then. I don't know your database, but it could also be that your empty cell contains a space. Try this solution then
if [Approval Date] = " " then "Not Approved" else "Approved"
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy