Forum Discussion

united2win's avatar
united2win
Helper III
3 years ago
Solved

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. ...
  • vanessafvg's avatar
    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")
  • Thomas_Daubert's avatar
    3 years ago

    hello,

    I did it with this formula : 

     
    new =
    var mois_prec = DATEADD(Sheet1[Revenue Date], -1, MONTH)
    return
        if(
            CALCULATE(
                 COUNT(Sheet1[Customer])
                 , mois_prec
            ) = 0
            , "New"
        )