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
FPagden
Frequent Visitor

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).

 

I want to set up an alert to warn managers when an employee in their team is due to run out soon (eg next 3 months) so they can arrange a test, and and alert when they've run out. 

 

Clearly this would be based on today's date vs the date their test pass runs out.

 

I don't think this would work with a KPI or a gauge as it needs to apply to all 500 employees in the organisation - I've built a page in the report witha  very simple table, but all the instructional content online seems to refer to KPIs etc.

 

Can anyone help? Sorry that this is a super simple question!

1 ACCEPTED SOLUTION
MAwwad
Super User
Super User

 

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!

View solution in original post

2 REPLIES 2
MAwwad
Super User
Super User

 

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!

Thank you for your help!

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.