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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Assign "Data Not available" for blank values for below dax

I've a few blank rows in the Occupation column of Branch office table and I want to assign "Data Not available" when I extract occupation column values to my HEAD_OFFICE table. How can I update the below dax for the same?

 

=CALCULATE(FIRSTNONBLANK(BRANCH_OFFICE[Name],1),

filter(all(BRANCH_OFFICE), BRANCH_OFFICE[Occupation] ="Salesman" &&

HEAD_OFFICE[Office_ID]= BRANCH_OFFICE[Office_ID]))

 

@amitchandak  @Greg_Deckler , @Fowmy 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Try this please:

 

newMeasure =
VAR yourCalc =
CALCULATE(
    FIRSTNONBLANK(BRANCH_OFFICE[Name], 1),
    FILTER(
        ALL(BRANCH_OFFICE),
        BRANCH_OFFICE[Occupation] = "Salesman"
        && HEAD_OFFICE[Office_ID] = BRANCH_OFFICE[Office_ID]
    )
)
RETURN
IF(ISBLANK(yourCalc), "Data Not Available", yourCalc)

 

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Try this please:

 

newMeasure =
VAR yourCalc =
CALCULATE(
    FIRSTNONBLANK(BRANCH_OFFICE[Name], 1),
    FILTER(
        ALL(BRANCH_OFFICE),
        BRANCH_OFFICE[Occupation] = "Salesman"
        && HEAD_OFFICE[Office_ID] = BRANCH_OFFICE[Office_ID]
    )
)
RETURN
IF(ISBLANK(yourCalc), "Data Not Available", yourCalc)

 

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hey @BA_Pete  this is not working for Date column, any idea why or should I make any change in dax? 

Hi @Anonymous ,

 

I would say that this is because you are trying to assign a text-type output to a date-type field/measure.

One possible solution would be to duplicate your date field in power query and then change the data type to text. You can then use the original date field for time intelligence and relationships, but use the text version for measures/visuals such as in this case.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Thanks @BA_Pete , this works perfectly!! 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors