Forum Discussion

viswanath's avatar
viswanath
Cloud Apps
01-18-2022
Solved

Previous Month Comparison when Previous Month has Fewer Days(Indicator Widget)

Hello Everyone, We have come across one requirement for one of our customer, where days in Date as Dashboard filter and in an indicator widget primary value represents "count(Ids)" and in secondary...
  • harikm007's avatar
    01-19-2022

    Hello viswanath ,

    Check whether this formula gives you expected result. Here, if the value of PASTMONTH is blank or 0, it will look for a date 31 days ago.

    case when isnull(max(PastMonth(count([id])))) OR max(PastMonth(count([id]))) = 0
    then max((count([id]), prev([Days in Date], 31)))
    else max(PastMonth(count([id])))
    end