Forum Discussion

sraj's avatar
sraj
Responsive Resident
3 years ago
Solved

Aging bucket

Hi,   I have this aging bucket to look at two date range with the following return.  My question is how can I show those accounts that do have an open date but not a close date which needs to show ...
  • orlandopowerbi's avatar
    3 years ago

    Hi sraj, you only need to add that condition to the measure.

    Aging Bucket =
    VAR DaysAge =
        DATEDIFF ( pr_status_dtl[wf_open_dt], pr_status_dtl[wf_close_dt], DAY )
    RETURN
        SWITCH (
            TRUE (),
            or(ISBLANK(DaysAge),DaysAge <= 0), "Overdue",
            DaysAge < 15"Less than 15 days",
            DaysAge <= 30"15-30 days",
            DaysAge <= 60"30-60 days""60 days and above"      
           
        )