Forum Discussion
David_1970
8 years agoFrequent Visitor
DAX-formula counting clients
Hi, I want to be able to count the number of clients. However, if a new client becomes assigned to an already existing client group, that client should not be considered a new client. This is the cas...
- 8 years ago
Hi David_1970
Try this solution
Add a calculated column as follows
Index = IF ( CALCULATE ( COUNTROWS ( TableName ), FILTER ( TableName, MONTH ( TableName[Creation date] ) < MONTH ( EARLIER ( TableName[Creation date] ) ) && TableName[Client group number] = EARLIER ( TableName[Client group number] ) ) ) >= 1, BLANK (), 1 )Now Sum of this Index will give you desired RESULTS
Just Add Month and Sum of Index to a TABLE visual
Zubair_Muhammad
Community Champion
8 years agoHi David_1970
Try this solution
Add a calculated column as follows
Index =
IF (
CALCULATE (
COUNTROWS ( TableName ),
FILTER (
TableName,
MONTH ( TableName[Creation date] )
< MONTH ( EARLIER ( TableName[Creation date] ) )
&& TableName[Client group number] = EARLIER ( TableName[Client group number] )
)
)
>= 1,
BLANK (),
1
)
Now Sum of this Index will give you desired RESULTS
Just Add Month and Sum of Index to a TABLE visual
Zubair_Muhammad
Community Champion
8 years ago