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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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