This content has been marked as final.
Show 5 replies
-
1. Re: Last Non-Null Value in a Hierarchy
Joe OppeltJan 30, 2019 2:54 PM (in response to paul.winiecki)
1 of 1 people found this helpfulFirst of all, it looks like you have the actual data value of "Null" in your data. Not a NULL value there.
So this calc does what you want:
IF [Card] = "Null"
THEN [Suit]
ELSE [Card]
END
-
2. Re: Last Non-Null Value in a Hierarchy
Zhouyi ZhangJan 30, 2019 2:55 PM (in response to paul.winiecki)
1 of 1 people found this helpfulHi, Paul
See my solution below. Your Null value actually is a string, you should use quote.
Hope this helps
ZZ
-
3. Re: Last Non-Null Value in a Hierarchy
Joe OppeltJan 30, 2019 2:56 PM (in response to Joe Oppelt)
1 of 1 people found this helpfulAnd if you want it to continue looking to the [Color] value of Suit is also null:
IF [Card] = "Null"
THEN
If [Suit] = "Null" then [Card] ELSE [Suit] END
ELSE [Card]
END
-
4. Re: Last Non-Null Value in a Hierarchy
Joe OppeltJan 30, 2019 2:58 PM (in response to Joe Oppelt)
BTW: If your actual data has actual NULLs instead of the string value "Null", you can use the ISNULL() function:
IF ISNULL([Card]) ....
Or
IF NOT ISNULL([Card]) ...
-
5. Re: Last Non-Null Value in a Hierarchy
paul.winiecki Jan 30, 2019 7:43 PM (in response to Joe Oppelt)Thank you this is exactly what I needed! Was not familiar with the ISNULL function.
-Paul