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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
someshwarrc
Frequent Visitor

RELATEDTABLE DAX with FILTER on GROUP

someshwarrc_0-1662647061968.png

These are 2 entities in my SSAS model. There can be only 1 unique operation but multiple rounds associated to each operation. 

I want to be able to calculate the number of rounds that only have more than one deviated rounds. 

NOTE: round_deviated is TRUE/FALSE.

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @someshwarrc 

Thanks for reaching out to us.

please try this measure

Measure = CALCULATE(COUNTROWS(ROUNDS),FILTER(ROUNDS,ROUNDS[operation_id]=MIN(OPERATIONS[operation_id]) && ROUNDS[round_deviated]=TRUE()))

sample data

vxiaotang_1-1663557345441.png

vxiaotang_0-1663557338517.png

result

vxiaotang_2-1663557356982.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @someshwarrc 

Thanks for reaching out to us.

please try this measure

Measure = CALCULATE(COUNTROWS(ROUNDS),FILTER(ROUNDS,ROUNDS[operation_id]=MIN(OPERATIONS[operation_id]) && ROUNDS[round_deviated]=TRUE()))

sample data

vxiaotang_1-1663557345441.png

vxiaotang_0-1663557338517.png

result

vxiaotang_2-1663557356982.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

johnt75
Super User
Super User

You could try

Ops more than 1 deviated round =
SUMX (
    operations,
    VAR numDeviatedRounds =
        CALCULATE (
            COUNTROWS ( RELATEDTABLE ( rounds ) ),
            rounds[round_deviated] = TRUE ()
        )
    RETURN
        IF ( numDeviatedRounds > 1, 1 )
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.