Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 case for clients 2 and 4 in the table below. Thus, in January one client was created; in February there were zero clients created; in June one client; and in October there were two new clients. Any suggestions for a DAX-formula?
Client group number | Client number | Creation date |
1 | 1 | 2014-01-01 |
1 | 2 | 2014-02-01 |
3 | 3 | 2014-06-19 |
1 | 4 | 2014-06-23 |
5 | 5 | 2014-10-26 |
6 | 6 | 2014-10-28 |
Solved! Go to Solution.
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
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
User | Count |
---|---|
121 | |
72 | |
71 | |
57 | |
50 |
User | Count |
---|---|
167 | |
83 | |
68 | |
65 | |
55 |