Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Good afternoon everyone,
Working on some code for a DB, and there's a field I use to extract pay on a specific named basis. Though the first part of the code pulls the second parameter when I only want the first. An example;
if ([PayRange] = "2020FebPay" or [PayRange] = "2020AprPay" or [PayRange] = "2020JulPay" or [PayRange] = "2020OctPay") and [Contact] = "Paymaster Record1" or [Contact] = "Paymaster Record2" then [Pay] else if ([PayRange] = "2020DecPay" and [Contact] = "Paymaster Record2") then [Pay] else if [PayRange] = "BonusNovPay" and [PayRange] = "Paymaster Record1" then [Pay] else null
BonusNovPay still picks up some Paymaster record 2 contacts. Is there any way to fix?
Solved! Go to Solution.
Hey there. It should be
and ([Contact] = "Paymaster Record1" or [Contact] = "Paymaster Record2") then [Pay]...
That said, I'd advise you to stay consistent and disciplined with your if/and statements, like when you place some "and" statements in parentheses, but not others, leading to the issue you are experiencing!
--Nate
Hey there. It should be
and ([Contact] = "Paymaster Record1" or [Contact] = "Paymaster Record2") then [Pay]...
That said, I'd advise you to stay consistent and disciplined with your if/and statements, like when you place some "and" statements in parentheses, but not others, leading to the issue you are experiencing!
--Nate
Fantastic! Thanks for the assistance. I'll be sure to clean up my statements a bit more!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
10 | |
10 | |
8 | |
7 |