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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to count how many maintenance is not started in certain period?

I have MaintenanceCard table with Column "Id", "WorkBeginDate", "WorkEndedDate", "WorkStatus".  

WorkStatus values are "Not Started", "Completed"

I have date slicer for selecting for example 1.6.2019-7.6.2019.

I would like to Card visualization proving value for "Number of open MaintenanceCards". 

How to look back in history to see if WorkEndedDate was blank in 1.6.2019-7.6.2019. And how many MaintenanceCards met criteria?

 

Is this possible to do with calculated measure?

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi  @Anonymous ,

 

We can create a measure to meet your requirement:

 

Not Started Count =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Id] ),
    FILTER (
        'Table',
        'Table'[WorkStatus] = "Not Started"
            && ISBLANK ( 'Table'[WorkEndedDate] )
            && 'Table'[WorkBeginDate] >= MIN ( 'Calendar'[Date] )
            && 'Table'[WorkBeginDate] <= MAX ( 'Calendar'[Date] )
    )
)

 

7.jpg

 


If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared.

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi  @Anonymous ,

 

We can create a measure to meet your requirement:

 

Not Started Count =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Id] ),
    FILTER (
        'Table',
        'Table'[WorkStatus] = "Not Started"
            && ISBLANK ( 'Table'[WorkEndedDate] )
            && 'Table'[WorkBeginDate] >= MIN ( 'Calendar'[Date] )
            && 'Table'[WorkBeginDate] <= MAX ( 'Calendar'[Date] )
    )
)

 

7.jpg

 


If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared.

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Refer, if this can help :HR-Analytics-Active-Employee-Hire-and-Termination-trend

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.