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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Spartanos
Helper II
Helper II

COUNTIF is giving wrong outputs

I want to calculate per customer and per city the amount of time in transit (without weekend) =1 per manifest week, dived by the total rows of that customer, per manifest week. A customer could have multiple locations.

I also want to calculate the overall performance per customer (of all the manifest weeks), hence the qty of time in transit (without weekend) =1, divided by the total lines of the customer. 

 

Attached is the file, I don't understand why the outcome of the left table for week 16 is 60%, because it should be 50%. Of the total rows for Customer X in manifest week 16 (=6), only 3 rows have a time in transit (without weekend) of 1.

 

I don't understand how the filtering is working, and which rows are taking into account. I created a unigue combination of 

Unique flow combination = data[Manifest_week]& "-"& data[Ship To City]& "-"&data[Customer] and evaluated the performance, but it still shows 60% for week 16m for customerX in Ney York. The file is updated.

 

1 ACCEPTED SOLUTION
Spartanos
Helper II
Helper II

After I while I figured out the issue, I just had to put in some additional filtering for both DAX meassures.

View solution in original post

1 REPLY 1
Spartanos
Helper II
Helper II

After I while I figured out the issue, I just had to put in some additional filtering for both DAX meassures.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors