Forum Discussion
Anonymous
3 years agoNot applicable
Need DAX help on Calculate, Count and Filter Functionality
I've tried an IF(AND and CALCULATE(COUNT but I am struggling to find how to exclude the possibility of some variables in a count formula. I need to return everything in a Column (Action Code) tha...
- 3 years ago
Anonymous
Not sure if I correctly understand your requirement. Hope this is what you need. See Attached sample file.Count = SUMX ( VALUES ( 'DataSet'[PREM_NB] ), IF ( COUNTROWS ( CALCULATETABLE ( VALUES ( 'DataSet'[CRDT_COLL_ACTN_CD] ), ALL ( 'DataSet'[CRDT_COLL_ACTN_CD] ) ) ) <= 1, CALCULATE ( COUNTA('DataSet'[CRDT_COLL_ACTN_CD]) ) ) ) - 3 years ago
Anonymous
Please try
Count =
SUMX (
SUMMARIZE ( 'DataSet', 'DataSet'[PREM_NB], 'Date'[Week] ),
IF (
COUNTROWS (
CALCULATETABLE (
VALUES ( 'DataSet'[CRDT_COLL_ACTN_CD] ),
ALL ( 'DataSet'[CRDT_COLL_ACTN_CD] )
)
) <= 1,
CALCULATE ( COUNTA ( 'DataSet'[CRDT_COLL_ACTN_CD] ) )
)
)
Anonymous
3 years agoNot applicable
I've added more context above. If anyone can help it would greatly be appreciated.
- NikhilChenna3 years ago
Skilled Sharer
Hi Anonymous ,
It is very to hard to understand. IF possible can you explain the conditions in points.
Regards,
Nikhil Chenna