Forum Discussion

Oana's avatar
Oana
Advocate I
5 years ago
Solved

Help with DAX

I am just starting to learn DAX and need help to calculate On Time Delivery %  excluding a specific category: in Time Peformance I want to exclude "Missing LRD".

The table shows: projects listed by an unique number, a Submit date (completion date of the project) and status (A for completed), a Required date (the target date to complete the project), a calculated column Time Peformance (which compares the Submit date and Required date and assigns a category), Employee. I want to calculate On Time Delivery % to show how many projects were completed On Time for each Employee, but exclude the "Missing LRD" category projects, because for that category there is no Required date.         

Project IDSubmit DateSubmit StatusRequired DateTime PerformanceEmployee
5059243/5/2021A7/15/2021On TimeJJ
5059292/4/2021A9/23/202091-180 Days LateJJ
4879551/26/2021A1/29/2021On TimeFG
4879582/24/2021A12/18/202031-90 Days LateFG
4883232/25/2021A Missing LRDEP
4880991/28/2021A12/28/202031-90 Days LateDV
4812291/27/2021A3/10/2021On TimeDV
4812291/26/2021A1/22/20211-30 Days LateDV
5064051/29/2021A8/5/2021On TimeMP
5064053/1/2021A2/14/20211-30 Days LateMP
5064053/1/2021A Missing LRDDA
5064062/27/2021A2/25/20211-30 Days LateMP
5064333/11/2021A2/1/202131-90 Days LateMP
4878803/4/2021A10/30/2018Over 180 Days LateSV
  • Hey Oana ,

     

    try with Calculate:

    Project without Missing LRD = CALCULATE( COUNTROWS( myTable ), myTable[Performance] <> "Missing LRD" )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution βœ”οΈ and give it a thumbs up πŸ‘

    Best regards
    Denis

    Blog: WhatTheFact.bi

2 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey Oana ,

     

    try with Calculate:

    Project without Missing LRD = CALCULATE( COUNTROWS( myTable ), myTable[Performance] <> "Missing LRD" )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution βœ”οΈ and give it a thumbs up πŸ‘

    Best regards
    Denis

    Blog: WhatTheFact.bi

    • Oana's avatar
      Oana
      Advocate I

      Hi Denis, this is genius! I used your measure to calculate On Time Delivery excluding sites with Missing LRD. Thank you lots!