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
So I was never quite sure where you wanted the OR placed or if I had the field name correct. The syntax should work and you should be very close...
The fieldnames are correct.
The "OR" should be between 'Projects'[PrimaryDepartment] and 'Projects'[ImpactedDepartments]). If either of those fields contain the
- littlemojopuppy7 years agoCommunity Champion
Did you try changing the measure appropriately?
- MouserMike7 years agoHelper I
I've updated the measure with each of your suggestions but am still getting the errors.
- littlemojopuppy7 years agoCommunity Champion
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!