Feb 21, 2024 01:39 PM - edited Feb 21, 2024 04:59 PM
Solved! Go to Solution.
Feb 23, 2024 11:37 PM
Ah, try this:
IF(
OR(
{B (from Data)},
{B (from Data)} & "" = '0'
),
{B (from Data)},
{A (from Data)}
)
Feb 21, 2024 02:24 PM
Try using X = “” instead of X = BLANK(). I’ve run into similar issues with the BLANK() function and using empty quotes fixed it for me.
Feb 21, 2024 03:00 PM
I tried that too... same results... 😞
Feb 21, 2024 04:33 PM
Could you provide a base with some example data to help with troubleshooting?
Feb 21, 2024 04:39 PM
It's very simple.
Don't use BLANK().
You can use IF(X, 'value if X not blank' ). You can add 3rd parameter, it will be returned if X is blank.
IF(X, - is the check for 'non-emptiness'
IF(X>=0 - check for 'not negative'
It's two different IFs that should be combined
Unfortunalely, I cannot understand you goal.
if X>=0 then show X
If X is blank show Y
what if X<0 ??
Also, I might be wrong, but using new lines should divide different condition operators, for better readability. The way you use it, new line after each word in the same operator, making readability even worse than without new lines at all.
Indeed, I'm not a saint in the questions of code/formula formatting and conventions, so please consider it as my humble opinion.
Feb 23, 2024 05:03 PM
Thank you for offering to look at this. Here is a sample base I created.
The problem exists on "Expenses Combined" table in the 💠 Expense ❖ Field, Record #2.
I want the formula to return the $0 amount from the "Y-Exp SubLevel Total ",
not the $95 amount from the "X-Exp Top Level Total".
Basically, I am building a Profit and Loss page in Airtable and X is the Top Level Expenses and Y is the Sub-Level Expenses.
If the total of the Y-Sublevel is $0, I want the 💠 Expense ❖ Field to show $0. If the Y-Sublevel is Blank, I want the 💠 Expense ❖ Field to show the "X-Exp Top Level Total" amount.
The Formula used for 💠 Expense ❖ is:
Feb 23, 2024 05:07 PM
Thank you, I tried the Double IF formula before posting also, and still didn't receive the result I was looking for. I tried creating a Sample Base that I've linked above using the Double IF formula and no Blank() - still no luck.
I appreciate the constructive feedback regarding my formula writing... I by no means am correct in my style of formula writing - but it works for me. 😊
Feb 23, 2024 11:37 PM
Ah, try this:
IF(
OR(
{B (from Data)},
{B (from Data)} & "" = '0'
),
{B (from Data)},
{A (from Data)}
)
Feb 24, 2024 05:51 PM
Ding! Ding! Ding! We have a winner! That's it!
Thank you so much, Adam @TheTimeSavingCo, for looking at that and figuring out a solution - and another helpful formula building idea for me that I can use in the future!