I'm going to calculate new customers and i have problem with formula dax. For example i have 3 columns with id, sale date and sale.
I created it, but it doesn't work. Please help.
New customers =
VAR currdate = max(Dates[Date])
VAR salesthisperiod = [Sales]
VAR customers =
ADDCOLUMNS(AccountsPerformanceReports,"Sales Until Now", [Sales], "Running Total Sales", AccountsPerformanceReports[Running Total Sales])
VAR newcustomers =
FILTER(customers,[Running Total Sales] = [Sales Until Now] &&[Sales Until Now] >0)
Sales = SUM(AccountsPerformanceReports[Wydatki])
Running Total Sales =
VAR currdate = MAX(Dates[Date])
ALL(Dates[Date]), Dates[Date] <= currdate)