Forum Discussion

BO7's avatar
BO7
Regular Visitor
1 year ago
Solved

Populating Date Field Only When Status Field Is Complete

Hello Everyone,

 

I am very new to Power BI, and am trying to absorb as much knowledge as possible. I have two columns: Deployment Status & Deployment Date. Right now, the Date field is always populated, even if the status is in progress. Is there a way to change the code so that when the Status field is marked complete, only then does the Date field become populated?


This is what I have so far:

IF(ISBLANK(Asset[Deployment_Date]), BLANK(), FORMAT(Asset[Deployment_Date], "MM-DD-YYYY"))
  • Hi BO7,

    If you want the Deployment_Date to be populated only when the Deployment_Status is "Complete", and otherwise remain blank, you should modify your formula like this:

     

    IF(

        Asset[Deployment_Status] = "Complete",

        FORMAT(Asset[Deployment_Date], "MM-DD-YYYY"),

        BLANK()

    )

    Explanation:

    This checks if the Deployment_Status is "Complete".

     

    If yes, it formats and displays the Deployment_Date.

     

    If no, it returns a blank.

     

2 Replies

  • Hi BO7,

    If you want the Deployment_Date to be populated only when the Deployment_Status is "Complete", and otherwise remain blank, you should modify your formula like this:

     

    IF(

        Asset[Deployment_Status] = "Complete",

        FORMAT(Asset[Deployment_Date], "MM-DD-YYYY"),

        BLANK()

    )

    Explanation:

    This checks if the Deployment_Status is "Complete".

     

    If yes, it formats and displays the Deployment_Date.

     

    If no, it returns a blank.

     

  • v-sdhruv's avatar
    v-sdhruv
    Community Support

    Hi BO7 ,
    Just wanted to check if you had the opportunity to review the suggestion provided?
    If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank You