Forum Discussion
Display data from two tables in a Matrix visual
- 4 years ago
I have two questions regards to using FirstNonBlank.
It appears that this function is fairly new one (if I am not mistaken).
1) What is usage of this function?
2) What does "1" mean for the expression?
Thanks.
Hi JustinDoh1 , It's used the return the first non blank value in a table. You would typically use it with a measure. So for example if you had a sales table with null values and you wanted to get the first date where there is a value, you could write. FIRSTNONBLANK(Sales[Date],[Sales Measure])
The 1 is a way of short circuiting the measure for want of a better word. So when you add the 1 instead of a measure, you are basically asking for the first text value it finds.
So if the first row that is not blank and equals Actual then do this else do that.
If you just write FirstNonBlank(Actual[ActualOrEstimated2],1) into a measure and drag it into a visual, you will see what it's doing.
HTH,
D
- JustinDoh14 years agoPost Prodigy
davehus Looking back to your previous response, I realized that you mentioned about "FirstNonBlank" on the post, but the Pbix file had the "Value".
Sorry. I might bypassed the details and just jumped into the Pbix file you have shared.
Anyway, I am learning new stuffs. Thanks!