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
Finexio
Frequent Visitor

Aggregate calculated measure in table

Hi all,

 

I need help creating a calculated measure in a table similar to what a tuple would do back in the days of SSAS.

I have a table (see below) at the "order level" but would like to count the number of orders within a payment.

Help is much appreciated

Finexio_0-1640715907426.png

 

 

1 ACCEPTED SOLUTION
SteveHailey
Solution Specialist
Solution Specialist

I think you're asking for a calculated column, rather than a measure. If so, I would add a new calculated column that looks like the following:

 

Orders/Payment Count =
VAR PaymentReferenceOfCurrentRow = ( 'Table'[Payment Reference] )
VAR Result =
COUNTROWS (
FILTER ( Table, Table[Payment Reference] = PaymentReferenceOfCurrentRow )
)
RETURN
Result

View solution in original post

2 REPLIES 2
SteveHailey
Solution Specialist
Solution Specialist

I think you're asking for a calculated column, rather than a measure. If so, I would add a new calculated column that looks like the following:

 

Orders/Payment Count =
VAR PaymentReferenceOfCurrentRow = ( 'Table'[Payment Reference] )
VAR Result =
COUNTROWS (
FILTER ( Table, Table[Payment Reference] = PaymentReferenceOfCurrentRow )
)
RETURN
Result

Thanks.  That worked once I put it in the right table.  

Much appreciated!

 

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!

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.

Top Solution Authors
Top Kudoed Authors