Forum Discussion

Spartanos's avatar
Spartanos
Icon for Helper II rankHelper II
4 years ago
Solved

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.

 

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

1 Reply

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