Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
smurfette29
New 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(Ewswb(Subdiv),1),
Filter(Ewswb, Ewswb(Diesicom)=Ref100(Diesicom))

 

Out of 6700 products to lookup, there are 700 products which are empty/blanks. I double check my source data, and confirmed all informations are available. I asked my friend for help but he also cannot figure it out why some of the rows are blank and some has data.

 

I hope someone can help me, as I am stressed out already figuring what is the problem.

 

TIA.

 

 

 

 

1 REPLY 1
edhans
Super User
Super User

I'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.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.