Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
WilfredK
Frequent Visitor

Incoming Username (embedded Dashboards)

For several reasons we 'misuse' the username string provided from our host to the embedded Power BI dashboard.  (...|username| extra...) With Dax(pathitem) we retreive the info we need.  We cannot provide this info into a database field, for that reason we solved it like this.  The reason why we want all this is complicated, so I stick to the main issue we have now.  
 
When we use the retreived info in a new calculated column we get the following error. 
CUSTOMDATA, USERNAME, USERCULTURE and USERPRINCIPALNAME functions are not supported in calculated tables/columns. These functions may only be used in Measures or in the AllowedRowsExpression.
 
Is there any way to solve this so we can use the info in a new column? 
5 REPLIES 5
JosefPrakljacic
Solution Sage
Solution Sage

Hey @WilfredK ,

 

unfortunately - no. (If I have understood you correctly)

 

What are you actually trying to achieve? - Is this thread somehow helpful?

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

Hi @JosefPrakljacic 

 

Thnx for your reply. 

Ths issue we have is that we need to calculate with time.  1 dashboard can have multiple users in different timezones. They need to see the data in their own timezone.  For that reason, we need to recalculate time.    

hi, @WilfredK 

These function could not be used in calculated column, and I think you could use them to create a measure.

Please share some simple sample data and your expected output, we could have a test on it.

Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thnx all for your replies so far. I've added a small test dashboard to clarify my issue. 

 

Steps: login as user test|4 

pathitem returns 4 in measure 'item'.

The datetime field needs 4 extra hours provided by the pathitem measure.  In this test I expect the current datetime + 4 hours

(field calculated time)

Again: a measure to solve this issue is not an option. I have to do a recalculation for each datetimefield in my data set so i need to add an new calculated column. 

 

PowerBI file

 

  

 

Anyone? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.