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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello - I am trying to solve a fairly basic problem, but my measure is not giving me the correct result.
I need to count the number of distinct shipments per day (or month, etc) based on the Order #. Then I will display the total in a card visual. So in my example below, the correct count should be 4. An order can have multiple lines, but as long as they ship on the same day, it is counted as one shipment. Below you can see there are 4 distinct order numbers, all shipped on Jan 9.
There are occassions were a line item from an order can ship later or earlier than other lines from that Order. That is why I need a distinct count using the Order #.
For whatever reason, my current formula is giving me the number 12 and I have no idea why.
Hi @Anonymous ,
You could try to use "ALLEXCEPT" to replace "FILTER".
Maybe your problem is not in the formula, you could share your sample data and excepted result to me if you don't have any confidential information. Please upload your files to OneDrive and share the link here.
Hey @Anonymous
You can create a new table without duplications (key number will be your order number) and then you can easily count the distict orders per day.
I am not trying to count the number of distinct orders.
I am trying to count the number of shipments per day (tied to a distinct order number).
@Anonymous
Well if you have distict orders you will get the number that you need.
Otherwise maybe you can create a new key that might include order number / date in ascii format and then calculate unique shipments per unique orders by date.
Yes, I see what you're saying now.
But shouldn't my formula above give the correct result? I'd like to do this formulaicly without creating another table (or using the filters in the filter area). I thought by creating a measure using distinctcount it would filter the order numbers down to their distinct values already.
yes as i see , it's supposed to return correct results.
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!