Forum Discussion

akito's avatar
akito
Frequent Visitor
4 years ago
Solved

IF with multiple condition (more than 3) + DAX formula help needed

Hi Masters,   I am pretty new in DAX as well as in Power BI.    Please see below snapshots : Basically I am trying to mark/tag my projects with specific words based on their approval statuses. I ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi akito ,

     

    Try this measure.

    Required Approvals = 
    VAR _finance_approvals =
        MAX ( 'Initiative Pending Approval'[Finance Approvals] )
    VAR _risk_approvals =
        MAX ( 'Initiative Pending Approval'[Risk Approvals] )
    VAR _workstream_approvals =
        MAX ( 'Initiative Pending Approval'[Workstream Approvals] )
    RETURN
        SWITCH (
            TRUE (),
            _finance_approvals = "Yes"
                && _risk_approvals = "Yes"
                && _workstream_approvals = "Yes", "F-R-W",
            _finance_approvals = "Yes"
                && _risk_approvals = "Yes"
                && _workstream_approvals = "", "F-R",
            _finance_approvals = "Yes"
                && _risk_approvals = ""
                && _workstream_approvals = "", "F"
        )

    Attached PBIX file for reference.

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data