Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a table in Power BI showing orders and their shipping times. One column is called Shipping Method and contains values like same-day, first class, standard etc. Other columns are 'Order Date' and 'Shipping Date'.
I have calculated the shipping time in days by creating a calculated column called "Shipping Time" and deducting the order date from the shipping date. For Same Day shipping, then, the calculated value should be 0 as the shipping date should be the same as the order date.
I would like to create a measure that counts the number of rows where the following conditions are satisfied: Shipping Method is "Same Day" AND Shipping Time is >0. However, I can't see any obvious ways to do this and I'm not experienced enough in DAX without any help.
I can use the filters on my table to satisfy the above conditions, but I would like the measure to display the total count of same day "fails" and update when refreshed with new data.
Please could someone help me?
Thank you in advance.
Debbie
Solved! Go to Solution.
Please try something like this for your Measure:
SameDay_Late = CALCULATE( COUNT( YourTable[OrderID]),
FILTER( YourTable,
YourTable[ShippingMethod] = "Same Day" &&
YourTable[ShippingTime] > 0 ))
This assumes [OrderId] is numeric. If it is text use COUNTA.
Hope this gets you where you need to go.
Regards,
That has worked perfectly! Thank you very much. 🙂
Please try something like this for your Measure:
SameDay_Late = CALCULATE( COUNT( YourTable[OrderID]),
FILTER( YourTable,
YourTable[ShippingMethod] = "Same Day" &&
YourTable[ShippingTime] > 0 ))
This assumes [OrderId] is numeric. If it is text use COUNTA.
Hope this gets you where you need to go.
Regards,
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 40 | |
| 21 | |
| 18 |