The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |