Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CarryASaw
Frequent Visitor

Calculating distinct count of actions that are open for more than 30 days

Hi, I am trying to calculate the actions that are open for more than 30 days.

Below are the code that I created for calculation: It doesnt work and giving me the wrong calculation.

 

 

OverDueActionHigh Open30d = 
 CALCULATE(DISTINCTCOUNT(EventsAction[Id]),

    Filter(EventsAction, 
    EventsAction[Finding Date] + 30 //days??
    && EventsAction[Criticality] = "High" 
    && EventsAction[Status] = "Open - In Progress"
    )
)

 

 


I just want to count how many open actions that are still open for more than 30 days from the finding date.

This is my table that Im using.
Table: EventsAction

IdCriticalityStatusFinding Date
13232HighOpen - In Progress1/10/2023
1442HighOpen - In Progress27/11/2023
122451HighClosed9/08/2023
22423ModerateClosed10/08/2023
24552LowOpen - In Progress7/01/2024
3335261LowClosed10/08/2023
3552HighOpen - In Progress10/11/2023
6696HighOpen - In Progress

12/03/2024

 

Note that Id 6696 is not yet overdue as it was only created recently.

 

The result I need to get should be:

CarryASaw_0-1710473110507.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below.

 

Jihwan_Kim_0-1710477000019.png

 

 

OverDueActionHigh Open30d =
CALCULATE (
    DISTINCTCOUNT ( EventsAction[Id] ),
    FILTER (
        EventsAction,
        TODAY () - EventsAction[Finding Date] > 30
            && EventsAction[Criticality] = "High"
            && EventsAction[Status] = "Open - In Progress"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below.

 

Jihwan_Kim_0-1710477000019.png

 

 

OverDueActionHigh Open30d =
CALCULATE (
    DISTINCTCOUNT ( EventsAction[Id] ),
    FILTER (
        EventsAction,
        TODAY () - EventsAction[Finding Date] > 30
            && EventsAction[Criticality] = "High"
            && EventsAction[Status] = "Open - In Progress"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.