I am trying to build a page where it returns table for the logged in user. And then you can use the filter to look at other users records .
User = USERPRINCIPALNAME()
I am having problems filtering the table for the logged in user . Without using row level security with data model changes like below . Is there a way for the Power BI table to return data just for the logged in user ? No SSAS involved.
https://medium.com/#barrasa8/dynamic-data-masking-in-powerbi-based-on-rls-927eb6a34e5d**strong text**
The data model is a FACT table linked to a USER dimension. In the User Dimension , there is an email address which is what the USERPRINCIPALNAME() resolves to.
I thought about a DAX summary table with summarise and may try that later . Then 2 buttons on the page , one to show current logged in user and the other button just gives you details about all other users data and work with all the filters on the page .
So basic want is
Logged In User : X
Table - Col 1 , 2 ,3 .... ( Filtered for User x only by default )
Then I would like a way for the logged in user then to see others user data easily.
Unfortunately there is no way to use USERNAME() or USERPRINCIPALNAME() in DAX measures.
What you're left with is using row level security but that would mean it'll not be possible to show the data of other users.
The best alternative I can think of is to load the data twice. Then set Row Level Security on one table, display that one as "Your data", don't use RLS on the second table and display that as "Other people's data". Put them side by side for easy comparison.
I just wrote a blog post about a similar challenge on how to make sure you can still filter both tables: https://www.linkedin.com/pulse/calculating-totals-row-level-security-using-powerbi-van-der-pasch
Related
I am trying to take the filter context from my PBI dashboard to a Power App Edit Form. The scenario is as follows:
I have two tables:
Comments_Table:(empty until write back data is submitted)
Salesperson
Comments
Date
Value
Salesperson_Table:
Salesperson
Information
Salesperson1
1
Salesperson2
2
The Power App should allow users to Write Back data for the following columns to the Comments_Table:
Comments (free text)
Date (date)
Value (free text)
Every new entry should be a new row in the table.
The selected Salesperson should also be written back but should be set by the users' selection in a PBI filter. For instance, in the dashboard, users will be forced to select a unique salesperson, and this should filter the Power App.
I currently have two issues. I have set up a Form that makes a LookUp on a gallery which references the Salesperson table via the PowerBIIntegration.Data. Salesperson is in the form as a view text only item.
I am only able to filter to values that already exist in the Comments table (I prefilled some dummy rows) - it does not currently take the value from the Salesperson table...
Every new entry in the Edit Data Form overwrites the previous entry
for that salesperson. It should add a new of data instead...
Any ideas on how to proceed would be greatly appreciated...
I am trying to implement row-level security on one table based on a separate users table. I've seen this talked about in places like this, but haven't been able to get things working for my case.
Users table:
Transactions table:
The table I'd like to secure is called Transactions. One of the fields in each row is CompanyID. The Users table contains three columns: AccountID, UserEmail, and CompanyID. What I'd like is for only users assigned to given CompanyIDs to be able to view rows in the Transactions table with those CompanyIDs.
Since more than one User may view a given row, I established a one-to-many relationship from Transactions to Users on the CompanyID field.
I created a DAX expression that filters on the Users table with the following:
[UserEmail] = USERPRINCIPALNAME()
When I select "View As -> Other User" in Power BI Desktop and enter a random email, though, I can still see the entire report. Any idea what I'm leaving out?
EDIT:
I left out an important stipulation: Any user associated with a CompanyID of 1 can view all the records of the Transaction table. I've tried approaches similar to this
[UserEmail] = USERPRINCIPALNAME() ||
COUNTROWS(FILTER('Users', [UserEmail] = USERPRINCIPALNAME() && [CompanyId] = 1)) = 1
but they don't work. Even users with CompanyId of 1 are prohibited from viewing the table.
From the docs:
By default, row-level security filtering uses single-directional
filters, whether the relationships are set to single direction or
bi-directional. You can manually enable bi-directional cross-filtering
with row-level security by selecting the relationship and checking the
Apply security filter in both directions checkbox. Select this option
when you've also implemented dynamic row-level security at the server
level, where row-level security is based on username or login ID.
https://learn.microsoft.com/en-us/power-bi/admin/service-admin-rls
I have a Table -
and an another table like -
.
So I am applying filter for UserName in url(powerbi report server url) and filtering only 'XYZ'. I have to use Users as slicer. Now, if the filter value matches with the Users then "My view" else values present in Users Like -
NOTE : There is not relationship between the two tables.
I am working on a report that deals in employee feedbacks. I have different cards on top to show -
(Requests Received,Type of requests(social/others/security),Requests reported/not reported and expired).
All these cards have data based on a measure - Count of Employee IDs = count('vw_EmployeeFeedback'[Employee_Id]) + 0 and respective filter fields dragged on to them to show category type etc.
Below them I have a table to show the detailed view of the data. Such as names of manager raising the request, Request raised for(name field) , status of requests, submitted date etc. coming from the same view as Count of Employee Ids.
I want the cards to filter based on the selection of a row in the table.
The edit interaction are set to filter the cards, but all go zero or blank when I select a row in the table.
Please let me know how I can achieve this. Thank You!
I am assuming that you have different tables for your data source/s that is why it is not filtering when clicking the table entry. Try establishing the relationships of your tables. Just go to Models and then Manage Relationships. If it's not the case, then you need other solutions.
I am using FileMaker Pro 13. I need to add Portal to show data from related table.
Some fields which I wanna add to Portal are "Foreign keys" from that related table that are linked-related to third table.
Results I am getting in Portal from those fields are numbers, but I need data (text) from that third table that is related to that "Foreign key".
Is it possible to create portal that shows text related to that foreign key, and if it is, how to achieve that?
Thanks a lot!
Example schema is on link https://www.lucidchart.com/invitations/accept/e45dfdfd-185d-46c8-ad9e-e8e8dc270ee7
In general words, I want to add Portal on layout based on Table3, so I can view related data from Table2, and it would have fields tbl2item, TBL1_foreign key (from where I pull data from Table 1 when I enter data in Table 2, using pop up menu). And in Portal data I need TBL1_foreign key to be represented as text from related table instead of auto-numbers.
Assuming the relationship:
Table 1 --> Table 2 --> Table 3
You are in the layout based on Table 1. Make sure there is relationship to Table 3 and it is in the same group (TOG) in Manage Databases. Just place the field with text from the Table 3 on your portal row and it should work.
Make sure you select the correct relationship for Table 3. In drop-down list it should be in "Related" group. Should look like "Table 3::myFiled" on the layout, with the name the same as the name of your table instance (TO) from "Manage database" which could be different from your base table name
The other option would be to use value list.
I do not see your file, so if it does not work for you, post more details about your setup.