Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
I was wondering if there is a way to return a result from a column based on some condition.
I want to implement functionallity similar to RLS, but I do not want to exclude the complete row for the users. What I want to do is to check if the current user has access to all data in a certain row or not. If yes, then return [Description], if no, then return [AlternateDescription].
Here is an pseudo example:
TaskInfo := IF(USERNAME() = UserAccess[UserName]; Task[Description]; Task[AlternateDescription])
So I am checking if the username matches a criteria in another table, and based on that criteria choosing what column to to return.
Is this possible?
Best regards
First, 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
Second, you generally would use LOOKUPVALUE or MAXX(FILTER(...)...)
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |