Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In my model I try to create a variable that contains a formula that returns the content from a table given a current selection, but i also want it to return the NULL (blank) value when the cell is blank.
Now, my script looks like this:
let vVariable = 'sum({$<KV_Start_Date = {"< =' & ' $ ' & ' (=min(Date))"}>} KV_Actual_Value)
In practice, the data table containing KV_Value_Actual only have one cell for each selection. Thus, I'm actually only trying to get the content of the cell in the table returned by the function.
I find that the "sum" function returns blank cells as 0, not Null().
This is an example of the content I want the formula to return:
Selection | KV_Value_Actual | What I want the formula to return |
---|---|---|
A | 100 | 100 |
B | 50 | 50 |
C | ||
D | 0 | 0 |
Appreciate all help
Try the only() function instead of sum()
let vVariable = 'only({$<KV_Start_Date = {"< =' & ' $ ' & ' (=min(Date))"}>} KV_Actual_Value)