Forum Discussion
Anonymous
6 years agoNot 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 bas...
- 6 years ago
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" )
v-xuding-msft
6 years agoCommunity 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" )
- Anonymous6 years agoNot applicable
Thank you very much! This worked 🙂