Say a region only counts as On Target with at least $50,000 in sales and 20 orders. Join both tests inside one IF with && for AND, or || for OR.
In this tutorial, we’ll build a Power BI IF statement with multiple conditions on one sales table. We’ll go from two conditions to three, then nested IF, SWITCH, and COUNTIF-style measures.
Every result below comes from a report I built and tested in Power BI Desktop.
The Sample Sales Data We’ll Use
My demo file has 60 orders from 2026 worth $165,701, loaded with Get data > Text/CSV into a table named Sales. If you’re new to DAX, keep our list of common DAX functions open as you go. Here are the rows we’ll check by hand:
| OrderID | Region | Product | Quantity | Sales |
|---|---|---|---|---|
| SO-1001 | East | USB-C Dock | 2 | $458 |
| SO-1002 | West | Project Plan 3 | 8 | $2,880 |
| SO-1003 | West | Surface Laptop 7 | 5 | $6,495 |
| SO-1007 | East | ThinkPad X1 | 6 | $8,694 |
SO-1003 is the useful one. It’s a large order, but it isn’t in East, so it passes one test and fails the other.
By region, East has $81,686 from 32 orders, West $63,783 from 15, South $16,813 from 10, and Central $3,419 from 3.
Method 1: IF With && in a Calculated Column (Two Conditions)
Use && when every test has to pass. On the same Sales table, I’ll flag East orders of $5,000 or more. Select New column on the Table tools ribbon and enter this:
Priority Order = IF(Sales[Sales] >= 5000 && Sales[Region] = "East", "Priority", "Standard")

The red box is the single logical test IF receives. Seven orders in the table meet both conditions.

How does this work?
A calculated column runs once per row. SO-1007 is $8,694 in East, so both sides are true and it returns Priority.
SO-1003 is $6,495 but it’s in West. One side fails, so it returns Standard.
Method 2: IF With || (Either Condition)
Use || when any one test is enough. Same table, but now I want to review big orders or bulk orders. If you only need rows that match, our guide on filtering DAX based on a condition covers that side.
Review Flag = IF(Sales[Sales] >= 5000 || Sales[Quantity] >= 8, "Review", "OK")

That flags 18 of the 60 orders. Notice the single pair of conditions in the box and the two text results after it.
How does this work?
SO-1002 is only $2,880, but its quantity is 8, so it returns Review. SO-1001 fails both tests and returns OK.
When one column has to match several values, IN is shorter than a chain of ||. We’ll use it in Method 6.
Method 3: Three or More Conditions
This is where most people hit an error. The AND function takes only two arguments, so a third one fails. Here’s the formula I tried on the Sales table:
Three Way AND = IF(AND(SUM(Sales[Sales]) >= 50000, COUNTROWS(Sales) >= 20, DISTINCTCOUNT(Sales[Category]) >= 3), "Pass", "Fail")

Power BI rejects it with “Too many arguments were passed to the AND function. The maximum argument count for the function is 2.” OR has the same two-argument limit.
The fix is to chain the operator, which has no such limit:
Three Way AND = IF(SUM(Sales[Sales]) >= 50000 && COUNTROWS(Sales) >= 20 && DISTINCTCOUNT(Sales[Category]) >= 3, "Pass", "Fail")

The error is gone, and you can keep adding && for a fourth test.
Important: When you mix && and || in one test, add parentheses, such as (A || B) && C. Microsoft recommends parentheses whenever the order is in doubt.
Method 4: Nested IF for Tiers
A nested IF fits when you need more than two outcomes. I’ll sort the same orders into three size tiers:
Order Tier = IF(Sales[Sales] >= 5000, "Large", IF(Sales[Sales] >= 1000, "Medium", "Small"))

That gives 12 Large, 22 Medium, and 26 Small orders. The boxed part only runs for rows the first test rejected.
How does this work?
SO-1003 passes the first test and stops at Large. SO-1002 at $2,880 falls through to the inner IF and returns Medium. SO-1001 at $458 fails both and returns Small.
Method 5: Combine Conditions in a Measure
Measures work on totals, not single rows, so you can’t compare a bare column. Aggregate first, and store the results in variables. This one grades each region in the same Sales table. Select New measure:
Region Status =
VAR TotalSales = SUM(Sales[Sales])
VAR OrderCount = COUNTROWS(Sales)
RETURN
IF(
TotalSales >= 50000 && OrderCount >= 20,
"On Target",
IF(TotalSales >= 50000 || OrderCount >= 10, "Watch", "Needs Attention")
)

East is On Target, West and South are Watch, and Central is Needs Attention.
How does this work?
East clears both bars with $81,686 and 32 orders. West has the sales but only 15 orders, so it misses the first test and passes the OR test.
South has only $16,813, but its 10 orders are enough for Watch. Central fails everything with $3,419 and 3 orders.
Method 6: SWITCH(TRUE()) Instead of Nested IF (Recommended)
Once you have three or more outcomes, I’d use SWITCH. It reads top to bottom with no closing-bracket pileup. Our SWITCH function guide has more patterns. Here’s the same logic:
Region Status SWITCH =
VAR TotalSales = SUM(Sales[Sales])
VAR OrderCount = COUNTROWS(Sales)
RETURN
SWITCH(
TRUE(),
TotalSales >= 50000 && OrderCount >= 20, "On Target",
TotalSales >= 50000 || OrderCount >= 10, "Watch",
"Needs Attention"
)

Put the strictest test first, because SWITCH returns the first match and skips the rest.

Both boxed columns match on every row, including the Total, which shows On Target for $165,701 and 60 orders.
For a list of allowed values, use IN with SELECTEDVALUE. This measure shows sales only for two regions:
East or West Sales = IF(SELECTEDVALUE(Sales[Region]) IN {"East", "West"}, SUM(Sales[Sales]))
It returns $81,686 for East and $63,783 for West. South, Central, and the Total stay blank, since IF returns BLANK when you leave out the false value.
COUNTIF With Multiple Conditions in a Measure
DAX has no COUNTIF, so you count rows with CALCULATE or FILTER. Our COUNTIF-style measures guide covers the basics. Multiple conditions come with a trap, which this measure shows:
Large East Orders = CALCULATE(COUNTROWS(Sales), Sales[Region] = "East", Sales[Sales] >= 5000)
Here’s a version that tests either condition with FILTER, using the same table:
Large or Bulk Orders = CALCULATE(COUNTROWS(Sales), FILTER(Sales, Sales[Sales] >= 5000 || Sales[Quantity] >= 8))

Look at the first boxed column: Large East Orders shows 7 on every region row, even Central. The second boxed column splits correctly into 1, 8, 1, and 8, totaling 18.
How does this work?
Sales[Region] = "East" inside CALCULATE overwrites the Region filter coming from the visual. So every row counts East orders, whatever region it’s labeled.
FILTER walks through the Sales rows already in the visual’s context, so the region stays respected. To learn more, read our practical guide to DAX FILTER.
Microsoft also documents KEEPFILTERS, which adds a filter without removing the existing ones on that column. I didn’t run it on this report, so test it on yours.
Pro Tip: The third boxed column uses FORMAT inside a text label. Without it, the same average displays as 2761.68333333333 instead of $2,761.68.
Which Method Should You Use?
| You need | Use | Why |
|---|---|---|
| Every test true | && | No limit on the number of conditions |
| Any test true | || | Same, and shorter than OR() |
| One column, several values | IN | Replaces a chain of || |
| Two or three outcomes | IF or nested IF | Fine when it’s short |
| Three or more outcomes | SWITCH(TRUE()) | Easiest to read and edit |
| Count rows that match | CALCULATE + FILTER | Respects the visual’s filters |
Things to Keep in Mind
- AND() and OR() stop at two arguments. Use the operators for anything longer.
- Keep text and numbers apart. DAX can’t compare a number column with “185” in quotes, so remove the quotes.
- Blanks act like zero. Comparisons treat BLANK as 0, except
==, so a blank value can pass a test such as<= 100. - Check the Total row. A measure recalculates there, which is why the Total can show On Target.
- Keep SWITCH results one data type. Mixing text and numbers across results causes an error.
From here, try DAX MIN with a filter or browse the rest of our Power BI tutorials.
These related Power BI guides pair well with conditional logic:
Frequently Asked Questions
Can a DAX IF have more than two conditions?
Yes. IF takes one logical test, but that test can join any number of conditions with && or ||. In my test, three conditions joined with && were accepted with no error.
What is the difference between AND() and && in DAX?
Both test whether conditions are all true, but the AND function accepts only two arguments. The && operator can be chained, so it’s the better choice for three or more conditions.
How do I write IF with OR for multiple values in DAX?
Use || between tests, or IN with curly braces when one column can match several values, for example Sales[Region] IN {“East”, “West”}.
Is there a COUNTIF with multiple conditions in Power BI?
There’s no COUNTIF function in DAX. Use CALCULATE with COUNTROWS, and FILTER when the count must respect the visual’s filters.
Should I use nested IF or SWITCH?
For one or two outcomes, IF is fine. For three or more, I’d use SWITCH(TRUE()). Both gave identical results on my report, but SWITCH is easier to read.

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.