Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Counting Due Dates for a Card Visual

Hi

 

I have a column called SLA which lists dates of items due - 

 

I'd like to add some card visuals for the following:

 

Items past due = anything past todays date 

Items due soon = Date between today and 30 days 

Items due longer = date due 31 days or greater 

 

Is there an easy way to acheive this?

1 Reply

  • foodd's avatar
    foodd
    Community Champion

    I wrote these on a phone, so they are untested though the measures should follow the categories of past due, due soon, and due longer.

     

    Items Past Due Measure =
    CALCULATE (
        COUNTROWS ( 'YourTable' ),
        'YourTable'[Due Date] < TODAY ()
    )
    
    
    Items Due Soon Measure =
    CALCULATE (
        COUNTROWS ( 'YourTable' ),
        'YourTable'[Due Date] >= TODAY ()
            && 'YourTable'[Due Date]
                <= TODAY () + 30
    )
    
    
    
    Items Due Longer Measure =
    CALCULATE (
        COUNTROWS ( 'YourTable' ),
        'YourTable'[Due Date]
            > TODAY () + 30
    )