Forum Discussion

Amrelzaghal's avatar
Amrelzaghal
New Member
3 years ago

calculated measure

New in Power BI and  need to make 4 cards to show the required

1- No. of Employees complete on time

2- No. of Employees complete late

3- No. of Employees not complete and past due date

4- No of Employees not complete and didn't past due date 

and the below the column in the sheet

Employee ID   Course Name   Due Date   Course Completed   Completion Date   Completed On Time   Completed Late  Past Due

1 Reply

  • Shaloam's avatar
    Shaloam
    Frequent Visitor

    You have to use DAX to achieve this. 

    This is assuming you have either 'Yes' or 'No' in the [Course Completed], [Completed Late] and [Past Due] columns. If not, you can edit the measures to fit what you have in your data set.

     

    Add a card visual to your report. Then set the 'Values' field to the measure that counts the employees who completed on time.

    1. Employees Completed On Time = COUNTROWS(FILTER(TableName, TableName[Completed On Time] = "Yes"))

    2. Employees Completed Late = COUNTROWS(FILTER(TableName, TableName[Completed Late] = "Yes"))

    3. Employees Not Complete and Past Due = COUNTROWS(FILTER(TableName, ISBLANK(TableName[Completion Date]) && TODAY() > [Due Date]))

    4. Employees Not Complete and Not Past Due = COUNTROWS(FILTER(TableName, ISBLANK(TableName[Completion Date]) && TODAY() <= [Due Date]))

    Let me know if this works.