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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
norworrrr
New Member

If id is blank i want to return 0

From this DAX how can i check id blank
 
First lead id =
VAR firstassigndate =
CALCULATE (
        MIN ( 'lead'[created_at] ),
        ALLEXCEPT('lead', 'lead'[id])
    )
RETURN
    CALCULATE (
        SELECTEDVALUE ('lead'[Lead ID]),
        FILTER (
            ALLEXCEPT( 'lead', 'lead'[id]),
            'lead'[created_at] = firstassigndate
        )
    )
1 REPLY 1
Tahreem24
Super User
Super User

@norworrrr , simply add +0 at the end .

 

First lead id =
VAR firstassigndate =
CALCULATE (
        MIN ( 'lead'[created_at] ),
        ALLEXCEPT('lead''lead'[id])
    )
RETURN
    CALCULATE (
        SELECTEDVALUE ('lead'[Lead ID]),
        FILTER (
            ALLEXCEPT'lead''lead'[id]),
            'lead'[created_at] = firstassigndate
        )
    ) +0
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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.

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 community update carousel

Fabric Community Update - June 2025

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