Forum Discussion
united2win
3 years agoHelper III
DAX Formula Help
Hi, I have the following table of customer's and revenue dates. I would like to create DAX calculated column that tags the customer as 'New' when there is no revenue reported in the previous month. ...
- 3 years ago
sorry for the delay in responding.
you could try something like this
New Customer =var maxdate = PREVIOUSMONTH(NewCustomer[RevenueDate])return if(maxdate, BLANK(),"New") - 3 years ago
hello,
I did it with this formula :
new =var mois_prec = DATEADD(Sheet1[Revenue Date], -1, MONTH)returnif(CALCULATE(COUNT(Sheet1[Customer]), mois_prec) = 0, "New")
vanessafvg
3 years agoCommunity Champion
sorry for the delay in responding.
you could try something like this
New Customer =
var maxdate = PREVIOUSMONTH(NewCustomer[RevenueDate])
return if(maxdate, BLANK(),"New")
united2win
3 years agoHelper III
Thanks Vanessa,
The solution didn't seem to work, but I see where you're coming from with using the Previous Month logic. I have now created a PreviousMonth column in my data set, I just can't find a DAX formula that will result in the below (where previousDate is not found in RevenueDate for Client A)
Thank you
| RevenueDate | PreviousDate | Client | DAX Formula |
| 01/06/2022 | 01/05/2022 | Client A | New |
| 01/07/2022 | 01/06/2022 | Client A | |
| 01/08/2022 | 01/07/2022 | Client A | |
| 01/10/2022 | 01/09/2022 | Client A | New |