Forum Discussion
smurfette29
5 years agoNew Member
Missing data in Firstnonblank
Hello, I am new to this site and also a beginner PBI user. I have a problem using Lookupvalue and Firtnonblank, I hope someone can help me figure out. I used SubDiv = Calculate(Firstnonblank(Ew...
edhans
Community Champion
5 years agoI'm not sure exactly, but the code above isn't valid at all. You have no columns. Paste your code in DAX Formatter by SQLBI and copy the results back here.
But the FIRSTNONBLANK() function, what is the ,1 doing? You cannot evaluate 1 and get anything but 1. FIRSTNONBLANK() should be:
FIRSTNONBLANK(Table[Field], [Measure or Expression]), so
First Date =
FIRSTNONBLANK(
'Date'[Date],
CALCULATE(
SUMX(
Sales,
Sales[Price] * Sales[Quantity]
)
)
)
Will return the first date in your model for which there are sales.