Forum Discussion
Error on using UserName() function in custom table
- 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
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
I have a very similar situation and create the same measure. But when browsing the cube via SSMS, I get the error:
The function MIN takes an argument that evaluates to numbers or dates and cannot work with values of type String.
So I'm switching to FIRSTNONBLANK.
But this creates a MEASURE, and I can't use that in a FILTER on a page.
Any advice is appreciated.