Forum Discussion
KamalMalek
2 years agoNew Member
Distinct Count with sum conditions
Dear All, In table down i need to count active users with no purchase at all, when we use Dax Furmula Measue= calculate(distinctcount{"User", Filter(status="Active"&&purcahse value="0") = 3 users w...
- 2 years ago
KamalMalek
Use this measure:Never Bought = CALCULATE( COUNTROWS( FILTER( DISTINCT( Table10[User] ), CALCULATE( SUM(Table10[Purchase value]) ) = 0 ) ), - 2 years ago
Hi KamalMalek ,
Another way:
VAR StatusActiveAndPurchase0 = DISTINCT( SELECTCOLUMNS( FILTER( 'Table', 'Table'[Purchase value] = 0 && 'Table'[Status] = "Active" ), "@User", 'Table'[User] ) ) VAR STatusActiveAndPurchaseNot0 = DISTINCT( SELECTCOLUMNS( FILTER( 'Table', 'Table'[Purchase value] > 0 && 'Table'[Status] = "Active" ), "@User", 'Table'[User] ) ) RETURN COUNTROWS( EXCEPT( StatusActiveAndPurchase0, STatusActiveAndPurchaseNot0 ) )
KamalMalek
2 years agoNew Member
Really appreciate your support thanks a lot 🙂
Fowmy
2 years agoSuper User
KamalMalek
Kinldy accept it as solution if it works for you.