In our My Standard Deviation Debug measure, we comment out the normal RETURN value for our My Standard Deviation measure and instead use FIRSTNONBLANK and LASTNONBLANK to return the minimum and maximum values from our __Table variable. Hence, when debugging our measure, we can essentially get information about the table that STDEVX.P is iterating over in order to understand whether the table adheres to the expected range of our calculation.
This technique can be used with any of the iterator functions, such as SUMX, AVERAGEX, COUNTX, and MEDIANX. In addition, this technique can also be used with any table created within a DAX expression. Understanding the properties of otherwise hidden, internal DAX tables can greatly aid in the troubleshooting and debugging of measure and column calculations.