Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Experts
I am trying to exclude in the column "UnsafeActByPeople where we have the text "No human contributing factor".
My error message two few arugments passed to the CONTIANSTRING function
m_count_coworker_LTA_UnsafeActByPeople_PSK =
var result=
CALCULATE(COUNT(vw_fct_irs_accidents[irs_accidents_bk]),
FILTER(vw_fct_irs_accidents, 'vw_fct_irs_accidents'[TypeOfPersonInjured]="Co-Worker" &&
'vw_fct_irs_accidents'[AccidentResultedInLostTime]= "Yes" &&
'vw_fct_irs_accidents'[incident_category_master]="Injury accident" &&
NOT(CONTAINSSTRING(vw_fct_irs_accidents[UnsafeActsByPeople] = "No human contributing factor"))))
RETURN
IF(ISBLANK(result),0,result)
Hi @Anonymous
Try the following measure
m_count_coworker_LTA_UnsafeActByPeople_PSK =
VAR result =
CALCULATE (
COUNT ( vw_fct_irs_accidents[irs_accidents_bk] ),
FILTER (
vw_fct_irs_accidents,
'vw_fct_irs_accidents'[TypeOfPersonInjured] = "Co-Worker"
&& 'vw_fct_irs_accidents'[AccidentResultedInLostTime] = "Yes"
&& 'vw_fct_irs_accidents'[incident_category_master] = "Injury accident"
&& CONTAINSSTRING (
vw_fct_irs_accidents[UnsafeActsByPeople],
"No human contributing factor"
)
= FALSE ()
)
)
RETURN
IF ( ISBLANK ( result ), 0, result )
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 66 | |
| 65 | |
| 56 |