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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.