Forum Discussion
Trosa_220568
4 years agoRegular Visitor
COUNT
Hi, I have a table of distinct Account records, and I want a measure that counts how many Activities each Account have in a table of Activities. If an Account doesn't have any Activities, show Blank...
- Anonymous4 years ago
Hi Trosa_220568 ,
There are two ways, please choose:
First way: select "Show items with no data"
Second way: adjust your DAX formula
NO.Activities = IF ( HASONEVALUE ( Accounts[ID] ), IF ( SELECTEDVALUE ( Accounts[ID] ) IN VALUES ( Activities[Account ID] ), COUNTX ( Activities, Activities[Account ID] ), "" ), COUNTX ( Activities, Activities[Account ID] ) )Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi Trosa_220568 ,
There are two ways, please choose:
First way: select "Show items with no data"
Second way: adjust your DAX formula
NO.Activities =
IF (
HASONEVALUE ( Accounts[ID] ),
IF (
SELECTEDVALUE ( Accounts[ID] ) IN VALUES ( Activities[Account ID] ),
COUNTX ( Activities, Activities[Account ID] ),
""
),
COUNTX ( Activities, Activities[Account ID] )
)
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.