Forum Discussion
NimaiAhluwalia
5 years agoContinued Contributor
Counting New Customers
I need to build logic to get new accounts opened for example Jan 10 accounts -- Bank started Feb 15 accounts --- 5 new accounts as 10 accounts was of the previous month March 21 accounts --- 6 ...
- 5 years ago
Hi, NimaiAhluwalia ;
Your logic is to use this month count - previous month count = new accounts, right? If so ,you could create a measure as follows:
New Accounts Opened = CALCULATE ( COUNT ( [Account Number] ), FILTER ( ALL ( 'Table (2)' ), EOMONTH ( [Acct opn date], 0 ) = EOMONTH ( MAX ( [Acct opn date] ), 0 ) ) ) - CALCULATE ( COUNT ( [Account Number] ), FILTER ( ALL ( 'Table (2)' ), EOMONTH ( [Acct opn date], 0 ) = EOMONTH ( MAX ( [Acct opn date] ), -1 ) ) )The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
5 years agoCommunity Support
Hi, NimaiAhluwalia ;
Your logic is to use this month count - previous month count = new accounts, right? If so ,you could create a measure as follows:
New Accounts Opened =
CALCULATE (
COUNT ( [Account Number] ),
FILTER (
ALL ( 'Table (2)' ),
EOMONTH ( [Acct opn date], 0 ) = EOMONTH ( MAX ( [Acct opn date] ), 0 )
)
)
- CALCULATE (
COUNT ( [Account Number] ),
FILTER (
ALL ( 'Table (2)' ),
EOMONTH ( [Acct opn date], 0 ) = EOMONTH ( MAX ( [Acct opn date] ), -1 )
)
)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.