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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Conditional Calculated Column with Groupings

Hello everyone, I am still new to DAX and I have a situation here that I've been looking to solve for a few days.

 

I have a table below and I am trying to populate Account_Status. The logic is bascially if the Unique_ID is same (group) and if any field in Product_Subscription is = 'Active' for this group, then Account_Status should be Active. How do I get this kind of output?

 

Thank you in advance!

 

Unique_IDProductProduct_SubscriptionAccount_Status
100P1ActiveActive
100P1InactiveActive
100P2InactiveActive
100P3ActiveActive
200P1InactiveActive
200P2ActiveActive
200P3InactiveActive
200P3ActiveActive
200P3ActiveActive
300P2InactiveInactive
300P2InactiveInactive

 

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Please try like this:

 

Account_Status =
VAR CountActive =
    CALCULATE (
        COUNTROWS( 'Table' ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Unique_ID] ),
            'Table'[Product_Subscription] = "Active"
        )
    )
RETURN
    IF ( CountActive > 0, "Active", "Inactive" )

 

2.PNG

 

 

Best Regards,
Xue Ding
If this post helps, then 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-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Please try like this:

 

Account_Status =
VAR CountActive =
    CALCULATE (
        COUNTROWS( 'Table' ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Unique_ID] ),
            'Table'[Product_Subscription] = "Active"
        )
    )
RETURN
    IF ( CountActive > 0, "Active", "Inactive" )

 

2.PNG

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you very much! This worked 🙂

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.