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.
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.