Forum Discussion
Jbridge450
7 years agoRegular Visitor
Measure error
Hi, I am a very new user to Power BI. I am encountering an error for the measure below. Can someone provide insight to the potential cause? If additional information is needed please let me know. ...
- 7 years ago
Hi Jbridge450,
I would suggest you use a calculated column rather than a measure in your scenario. And the formula can be optimized by removing IF.
Medical Compliance = SWITCH ( TRUE (), SEARCH ( "medline", 'FY18 Combined'[Supplier Name], 1, 0 ) > 0, "Compliant", SEARCH ( "mckesson", 'FY18 Combined'[Supplier Name], 1, 0 ) > 0, "Compliant", AND ( 'FY18 Combined'[Supplier#/Employee ID] = 103447, 'FY18 Combined'[Source] <> "BOAPCARD" ), "Compliant", "Non-Compliant" )I have added some data to make this example more clear.
Best Regards,
Dale
Jbridge450
7 years agoRegular Visitor
Works perfectly!! I really appreciate your response.
John