Forum Discussion

pratk30's avatar
pratk30
Advocate I
8 years ago
Solved

Error on using UserName() function in custom table

Hi Folks,   I am getting below error after using measure which stored USERNAME(). CUSTOMDATA, USERNAME and USERPRINCIPALNAME functions are not supported in calculated tables/columns. These functio...
  • v-jiascu-msft's avatar
    8 years ago

    Hi pratk30,

     

    As we can see from the error message, it isn't supported. What's your purpose? Maybe there are other approaches. For example, we can use a measure like this, then we can filter out these 0s in the Filters.

    Measure =
    CALCULATE (
        IF (
            MIN ( 'AssignmentTimephasedDataSet'[ResourcesOwner.ResourceEmailAddress] )
                = USERNAME (),
            1,
            0
        )
    )

    Best Regards,

    Dale