If-Else Function is a block with three entries. Depending on the boolean value of the entry named condition, a true or false entry will be selected.
In the following sample, if the total number of hours worked for each employee is greater than 4000, then in the promote field insert "yes", else insert "no". The output lists the name of the employee, the hours worked in each department and if he is promoted or not.

Note. This sample can be found in If-Else.dax in Samples\Job Samples folder.
OUTPUT:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns:root xmlns:ns="http://www.tempuri.org/XML">
<ns:emp last-name="Brown" first-name="John">
<ns:hist hours-worked="300" department="Accounting"/>
<ns:hist hours-worked="500" department="Sales"/>
<ns:hist hours-worked="3000" department="Development"/>
<ns:hist hours-worked="100" department="Accounting"/>
<ns:promote value="no"/>
</ns:emp>
<ns:emp last-name="Jane" first-name="Mary">
<ns:hist hours-worked="1000" department="Accounting"/>
<ns:hist hours-worked="8000" department="Sales"/>
<ns:hist hours-worked="5000" department="Development"/>
<ns:promote value="yes"/>
</ns:emp>
<ns:emp last-name="Clark" first-name="Arthur">
<ns:promote value="no"/>
</ns:emp>
</ns:root>