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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.