Forum Discussion

FPagden's avatar
FPagden
Frequent Visitor
3 years ago
Solved

Create Date related Alert from a Table

Hi,   I'm a beginner user.    My organisation has various mandated annual tests all employees must undertake and pass, with varying time periods for which that test lasts (mostly 6 or 12 months)....
  • MAwwad's avatar
    3 years ago

     

    you can use a calculated column in your PowerBI table. Here's an example:

    1. Add a calculated column to your table, named "Test Expiration Alert".
    2. In the formula bar, enter the following expression:

       


      = IF(TODAY() > [Test Expiration Date] + 90, "Test Expired", IF(TODAY() > [Test Expiration Date] - 90, "Test Expiring Soon", ""))

       

      This formula compares today's date with the test expiration date and returns "Test Expiring Soon" if the test will expire in the next 90 days and "Test Expired" if it has already expired. If neither of these conditions are met, the result will be an empty string.

      1. Use the "Test Expiration Alert" calculated column in a matrix or table visualization to show the status of each employee's test expiration.
      2. Set up row-level security so that each manager only sees their own team's data.

        You can also create a measure to count the number of expiring or expired tests for each team and display it in a card visualization.

        This is a simple solution that can be easily adapted to your needs. I hope it helps!