Hi everyone.
I'm getting in touch with the roles in Power BI. I've seen that there is a basic way to filter some tables basing on the username. Nevertheless, I've not found a simple pattern to address the need to filter out basing on many values. Let's see an example.
I have a fact table, called 'Fact', which is the one I want to filter out basing on some values. This table has field called Customer, which has values "A","B","C" and so on.
I've also created a table called 'Security' that has two fields: Username (which assumes the form ORGANIZATION\NAME) and SecCustomer. A user could be able to see more than one customer and for this reasone the table 'Security' contains many rows for each username in order to address this need.
I woul like to write a DAX formula in a role specificated for 'Fact' table that should have a behaviour like the following one:
[Customer] = LOOKUPVALUE('Security'[SecCustomer], 'Security'[Username], USERNAME())
The problem is that LOOKUPVALUE function returns only one value and does not suit at all this situation.
How can I do to filter out 'Fact' table basing on the Customers that come out from the security table in accordance to the given username?
Thanks.