Position Function returns the position of the current iterated record in the referenced data source.
Note: In order to use this function, an iteration must be started on the data source.
The following example lists all employees in ascending order. The "position" attribute specifies the position of the current iterated record in Output View.

Note. This sample can be found in Position.dax from Samples\Job Samples folder.
OUTPUT:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns:root xmlns:ns="http://www.tempuri.org/XML">
<ns:element-name first-name="Arthur" last-name="Clark" id="3" position="1"/>
<ns:element-name first-name="John" last-name="Brown" id="1" position="2"/>
<ns:element-name first-name="Mary" last-name="Jane" id="2" position="3"/>
</ns:root>