Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have a table in Power BI that contains the same values multiple times in a column, but I want to create a formula that says if any row in the column contains the same Control Name, and Status is equal to "Complete-Fail" and Discussed is equal to "Discussed with Mgmt" then make my new Effective/Ineffective column say "Ineffective", if not then "Effective" is returned. Keep in mind, every control will not have the same number of phases and not everything with a "Complete-Fail" status is Discussed with Mgmt. If you took, my sample data, I would only expect to see "Ineffective" for rows that say "Complete-Fail" and "Discussed with Mgmt."
Every control will have a Walkthrough phase while the other phases for each control will vary, so perhaps a formula can be built around if the control contains string "Complete" for the Walkthrough phase of a control, to find just one for that control that may contain "Complete-Fail" and "Discussed with Mgmt" for the Ineffective status.
Solved! Go to Solution.
Hi,
Please check the below image and the attached pbix file.
Or, please draw how the expected result looks like.
effective/ineffective CC =
VAR _condition =
COUNTROWS (
FILTER (
data,
data[control name] = EARLIER ( data[control name] )
&& data[status] = "complete-fail"
&& data[discussed] = "discussed with Mgmt"
)
) >= 1
RETURN
IF ( _condition, "ineffective", "effective" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calcualted column.
effective/ineffective CC =
VAR _condition = data[status] = "complete-fail"
&& data[discussed] = "discussed with Mgmt"
RETURN
IF ( _condition, "ineffective", "effective" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you, but for example, CBT-05 has one phase with Complete-Fail and Discussed with Mgmt, so I want every line that says CBT-05 to read as Ineffective or just use the Walkthrough phase row only to look at every phase for each control and put Effective/Ineffective on the walkthrough phase row (based on all phases) since every control has a walkthrough phase.
Hi,
Please check the below image and the attached pbix file.
Or, please draw how the expected result looks like.
effective/ineffective CC =
VAR _condition =
COUNTROWS (
FILTER (
data,
data[control name] = EARLIER ( data[control name] )
&& data[status] = "complete-fail"
&& data[discussed] = "discussed with Mgmt"
)
) >= 1
RETURN
IF ( _condition, "ineffective", "effective" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
This resolved it. Thank you!
var controlName = datum[Control Name]
var ineffective =
FILTER(
ALL( datum ),
datum[Control Name] = controlName
&& datum[Status] = "Complete-Fail"
&& datum[Discussed] = "Discussed with Mgmt"
)
return
IF( ISEMPTY( ineffective ), "Effective", "Ineffective" )
I tried using the formula, but received an error.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
10 | |
9 | |
9 |
User | Count |
---|---|
17 | |
14 | |
13 | |
12 | |
12 |