How to achieve Column level Security in Powerbi? - powerbi

While working on Power BI, I have to show few columns from TABLE visual to specific set of users and hide for others.
So, till now I have created two ROLE in Power BI and added users but unfortunately, I am not able to hide and show TABLE Columns as per ROLE.

At this point - Column Level Security and Hiding Columns is not something one can achieve with Power BI.
Kindly see this Post on Power BI Ideas.

Related

compare a measure to a value in a column

Power BI noob here, still thinking like a SQL coder, so please be patient.
How can I use the user name of the person running the report to filter the report?
As a convenience for my users, I want to provide a way for them to automatically filter to only see data related to their office or region. I have a Person table that includes details like their office location. If I can filter that based on the user name of the person running the report, and join it to the rest of the data, that would work.
Unfortunately, I don't see a way to get the user name in M.
Using the USERNAME() function in DAX, I don't see a way to compare this with individual values in a column. I get an error about being unable to compare a measure to multiple values.
It seems this would be a common request, so I'm sure somebody has solved this problem. But I haven't yet found the solution.
Use a RLS in your model. You can use function USERNAME(),USEROBJECTID (), USERPRINCIPALNAME (); The last one is useful if you have table with users and their email.
https://learn.microsoft.com/en-us/power-bi/admin/service-admin-rls
check also this GuyInCube video:
https://www.youtube.com/watch?v=MxU_FYSSnYU
First, be aware of the differences between USERNAME() and USERPRINCIPALNAME(). Most likely you will want to use the later one.
You can't use neither of these in M. Imagine your model is importing the data. The M code is executed once in the context of one user, then each other user accessing the published report will reuse the already loaded and calculated model. And of course, these are DAX functions, not M.
So in DAX you can use these to compare their values to columns from your model. You didn't gave any information about your model, but lets say there is a table Sales with columns Customer and Amount:
Customer
Amount
Bill Gates#Microsoft.local
100
Steve Ballmer#Microsoft.local
110
In this case, you can write a measure like this:
My Sales = CALCULATE(SUM('Sales'[Amount]), 'Sales'[Client] = USERPRINCIPALNAME())
When Bill Gates opens the report, he will see sales amount of 100, while if Steve Ballmer opens it he will see 110.
For diagnostic purpose, you can make a measure like this and show it somewhere in your report:
Who am I = USERPRINCIPALNAME()
If your goal is to build dynamic Row-Level Security within Power BI, it has some functionality which might help you, so take a look at these articles:
Row-level security (RLS) with Power BI
Restrict data access with row-level security (RLS) for Power BI Desktop
Row-level security (RLS) guidance in Power BI Desktop
Dynamic Row Level Security with Profiles and Users in Power BI : Many-to-Many Relationship

How to add calculated column to PowerBI datasets

I have created a dataset in Power BI web, and then imported it on Power BI desktop (using File -> Get data -> Power BI datasets).
I don't see a way of adding Calculated Columns. Does the dataset need some special configuration to enable this?
Based on my experience you won't be able to see the columns because it using direct query. you can still add some columns and measure but your'e basically flying blind. you can just select the table in the report(visual view) and add column however you'll have to play the guessing game. But if you know your dataset you should be fine.
However a Dataflow wouldn't give the issue you're having.

Missing Column in Power BI Service

I have been requested to add another column in a dataflow in Power BI and have done so and refreshed the dataset which uses the dataflow. The field is not appearing in the list of fields in Power BI for some reason. I have tried downloading the dataset on my desktop and cleared the cache and did not work. I opened Power Query (Transform data) and the column exists. I've tried to refresh preview and Close and Load but still not showing. I have 3 columns in that table in Power Query but only 2 are shown in the list of Fileds in Power BI.
Please can you help?
Power BI Filed List
Power Query
I was able to sort this out by right clicking the table and selecting Refresh data
check whether the data source path is correct or not in PBI desktop [path is from your local machine or not]
P.S: If this answer helps, please take a moment to check the tick mark and upvote this answer.

Power BI - Filtering a Table based on selection in a Bar Graph

I'm pretty new to Power BI.
I have a number of measures I've created in my Power BI app, data related to information requests that come to my team.
I've put these measures into a Bar Chart. I also have a table that lists details about these data requests. I want to be able to select an item in the Bar Graph and have the records in the Table to adjust to just those related to the selection.
I did this once by accident when i was fiddling around, now I can't figure out how i did it.
I also have a date filter set to affect all of my pages.
Any advice would be awesome.
Thanks in advance.
Jason
Try going to Model (highlighted in the screenshot, left side) and then Manage Relationships (highlighted as well). Then click on Autodetect. If Autodetect does not solve your problem, then you will have to create new relationships manually.

How to develop a reverse slicer in PowerBI?

Please I need your help.
I am doing a report in PowerBi in live connection.
The model is in an azure analysis service and I am devolopping report with PowerBi.
I need to prevent the user from selecting the same value in both slicers
In my report I have 2 slicers that are duplicated ( I am using them like a role playing dimension)
I want that when I Select "A" in the 1rst slicer I will have in the 2nd slicer the values except "A".
The goal is to prevent the user from selecting the same value in both slicers
What I want is like a reverse slicer.
Do you know how I could do it ?
Thanks for your help.