Hi all,
Hoping someone can help.
I'm currently trying to work out the NRR (Net Revenue Retention) for my customers and found this syntax on ChatGPT which I have changed to match my tables and columns:
Net Revenue Retention =
(
SUM('All Customers 2'[Value]) -
CALCULATE(SUM('All Customers 2'[Value]),
FILTER('All Customers 2','All Customers 2'[Customer] IN
CALCULATETABLE('All Customers 2',
DISTINCT('All Customers 2'[Customer])
FILTER('All Customers 2','All Customers 2'[Date] >= DATEADD('All Customers 2'[Date], -365, DAY))
)
)
)
/
CALCULATE(SUM('All Customers 2'[Value]),
FILTER('All Customers 2','All Customers 2'[Date] >= DATEADD('All Customers 2'[Date], -365, DAY)
)
)
* 100
I get this error:
The syntax for 'FILTER' is incorrect. (DAX( ( SUM('All Customers 2'[Value]) - CALCULATE(SUM('All Customers 2'[Value]), FILTER('All Customers 2','All Customers 2'[Customer] IN CALCULATETABLE('All Customers 2', DISTINCT('All Customers 2'[Customer]) FILTER('All Customers 2','All Customers 2'[Date] >= DATEADD('All Customers 2'[Date], -365, DAY)) ) ) ) / CALCULATE(SUM('All Customers 2'[Value]), FILTER('All Customers 2','All Customers 2'[Date] >= DATEADD('All Customers 2'[Date], -365, DAY) ) ) * 100)).
Can anyone help please?