Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
KasperJ90
Helper III
Helper III

Measure if qty between interval and other column criteria true

Hi

 

I have to create 3 measures based on intervals from the "Difference in days" column and if the column "Our Mistake" equals "No".

 

Measure1: sum Qty if "Difference in days" => 0 and <8 and "Our Mistake?" = "No"

Measure2:sum Qty if "Difference in days" =>8 and <21 and "Our Mistake?" = "No"

Measure3:sum Qty if "Difference in days" => 21 and <200 and "Our Mistake?" = "No"

 

QtyDifference in daysOur Mistake?
3005Yes
150040No

 

Can you help me do the correct formulas for creating the measueres in PowerBi?

 

Thanks

1 REPLY 1
Fowmy
Super User
Super User

@KasperJ90

Add the following three measures

Measure1 = 
SUMX(
    FILTER(Table6, Table6[Difference in days] >= 0 &&   Table6[Difference in days] < 8 && Table6[Our Mistake?] = "No"),
    Table6[Qty] 
)

Measure2 = 

SUMX(
    FILTER(Table6, Table6[Difference in days] >= 8 &&   Table6[Difference in days] < 21 && Table6[Our Mistake?] = "No"),
    Table6[Qty] 
)

Measure3 = 

SUMX(
    FILTER(Table6, Table6[Difference in days] >= 21 &&   Table6[Difference in days] < 200 && Table6[Our Mistake?] = "No"),
    Table6[Qty] 
)

________________________

If my answer was helpful, consider Accepting it as the solution to help other members find it

Click the Thumbs-Up icon if you like this answer 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.