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.
I have a dataset where I need to set the status of a user as Active or Inactive based on multiple criterias:
For any customer if there is any active user the status of Admin user should always be active irrespective of the status of that particular user. How can I do that in power BI?
Solved! Go to Solution.
@AS123
Add the following calculated column to your table:
New Status =
VAR __Flag =
CALCULATE(
COUNTROWS( Table01),
Table01[Status] = "Active",
ALLEXCEPT( Table01 , Table01[Customer] )
)
VAR __Result =
IF(
Table01[Admin] = "Yes" && __Flag > 0 ,
"Active",
Table01[Status]
)
RETURN
__Result
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@AS123
Add the following calculated column to your table:
New Status =
VAR __Flag =
CALCULATE(
COUNTROWS( Table01),
Table01[Status] = "Active",
ALLEXCEPT( Table01 , Table01[Customer] )
)
VAR __Result =
IF(
Table01[Admin] = "Yes" && __Flag > 0 ,
"Active",
Table01[Status]
)
RETURN
__Result
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
You can write the logic by using conditional DAX statements like IF or SWITCH/TRUE.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |