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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Multiple Origin Count Calculation

Hello all,

New user here, but working with a complex data set. It's a live connection to an AAS model, so unfortunately, I cannot create calculated columns or anything other than new measures. I'm trying to calculate the total number of orders which have multiple origins. So in the below data, the result would be 1, since only 1 order has 2 origins. Order 2 would only have 1 distinct origin, so it wouldn't count. 

 

Order 1, Origin 1

Order 1, Origin 2

Order 2, Origin 1

Order 2, Origin 1

 

Any help is appreciated, thanks!

Order 3, Origin 1 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this measure expression

 

Orders with >1 Origin =
COUNTROWS (
FILTER (
VALUES ( Orders[Order] ),
CALCULATE ( DISTINCTCOUNT ( Orders[Origin] ) ) > 1
)
)

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this measure expression

 

Orders with >1 Origin =
COUNTROWS (
FILTER (
VALUES ( Orders[Order] ),
CALCULATE ( DISTINCTCOUNT ( Orders[Origin] ) ) > 1
)
)

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

That did it, thank you!!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.