Forum Discussion
Add OR to a Measure
- Anonymous7 years ago
Try something like this:
Your Measure = var a = FIND(SELECTEDVALUE('DepartmentStakeholders'[Department]),SELECTEDVALUE('Projects'[PrimaryDepartment]),1,0) var b = FIND(SELECTEDVALUE('DepartmentStakeholders'[Department]),SELECTEDVALUE('Projects'[ImpactedDepartments]),1,0) return MIN(MAX(a,b),1)Hope this helps,
Nathan
I've updated the measure with each of your suggestions but am still getting the errors.
A couple things...
Without your PBIX file, I really can't tell you what the solution is. I'm giving you my best guess. I gave you how to incorporate AND and OR into measures...you need to figure it out.
More importantly, I've been participating in Microsoft forums covering VB/VBA, TSQL and Power BI for about ten years (Google my name to see!). I've asked questions - and at times very stupid ones - and I've answered questions. One thing I've learned is that it is extremely bad form to ask someone to "solve it for me". People who are volunteering their time, effort and thought to help you want to see you trying as well. Best of luck!
- Anonymous7 years agoNot applicable
Try something like this:
Your Measure = var a = FIND(SELECTEDVALUE('DepartmentStakeholders'[Department]),SELECTEDVALUE('Projects'[PrimaryDepartment]),1,0) var b = FIND(SELECTEDVALUE('DepartmentStakeholders'[Department]),SELECTEDVALUE('Projects'[ImpactedDepartments]),1,0) return MIN(MAX(a,b),1)Hope this helps,
Nathan
- MouserMike7 years agoHelper I
Anonymous that's exactly what I was looking for. Thank you.