Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token value is not render in Power Bi report #17

Open
CodergenixDeveloper opened this issue Jul 13, 2023 · 3 comments
Open

Token value is not render in Power Bi report #17

CodergenixDeveloper opened this issue Jul 13, 2023 · 3 comments

Comments

@CodergenixDeveloper
Copy link

CodergenixDeveloper commented Jul 13, 2023

We use Power BI Report In the DNN web for display report

DNN Framework version - 09.08.01
Power Bi report Version - 1.0.22
https://github.com/intelequia/dnn.powerbiembedded/releases/tag/v1.0.22

I am trying to display current DNN web LoggedIn user name in Power Bi report using Replacement Tokens
using [User:Username] this Token
https://docs.dnncommunity.org/content/tutorials/references/replacement-tokens/index.html

image

Please see in image, [User:Username] Token render in HTML module, but it is not render in powerBI report

Also I checked all values of User property dropdown but still failed
image

@davidjrh
Copy link
Member

Hi @CodergenixDeveloper,

If what you achieve is to show the logged user name on that table, you should use the DAX function "username()" so you can use the User property value passed from the DNN PowerBI Module.

To easily check the value that DNN is passing to PowerBI, you can add the Username to your model, as described in this post https://powerbi.microsoft.com/en-gb/blog/using-username-in-dax-with-row-level-security/

So for example, in your case:

  1. Set the "User Property" to "Username" in the module settings (is the default value)
  2. Add the table "User = username()" to your model
  3. Use that table where you want.

@CodergenixDeveloper
Copy link
Author

Hi @davidjrh

Thank you for your response

I checked using username() and userprincipalname() but it is return power bi logged user account username.
https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-rls

i need to get and use DNN web logged user username in power Bi report.
image

I need "Host" username in report but username() return "developer@co_.com" username
ps. "developer@co_.com" is my app.powerbi.com portal login user. which i used for login

@davidjrh
Copy link
Member

Is your report setup for using RLS? That parameter is only passed to the report if the report has RLS enabled. To test, create the role "Registered Users" and test again.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants