cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CraigC Helper I
Helper I

KPI showing incidents today vs yesterday, week and month

Hi All,

 

I would like to create a KPI indicator showing incidents created today vs yesterday. Currently i have no date table but i do have a create date cloumn. How would i go about creating this KPI?

 

Thank you

7 REPLIES 7
Super User IV
Super User IV

Re: KPI showing incidents today vs yesterday, week and month

Many times you do this by using a DATEDIFF coupled with TODAY in a column, such as:

 

DaysAgo = DATEDIFF([Date],TODAY(),DAY)

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

CraigC Helper I
Helper I

Re: KPI showing incidents today vs yesterday, week and month

Wouldnt this just count the days between the date and today? Im trying to calculate the number of incidents for today vs the number of incidents for yesterday on a KPI.

 

So effectively 

 

Incidents today: 4

Incidents yesterday: 2

 

with this shown on the KPI as an increase in the number of incidents.

Highlighted
Super User IV
Super User IV

Re: KPI showing incidents today vs yesterday, week and month

OK, the concept was to create that column and then you could create measures for you KPI's:

 

KPI_Today = CALCULATE(COUNT(<column>),[DaysAgo]=0)

KPI_Yesterday = CALCULATE(COUNT(<column>),[DaysAgo]=1)

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Microsoft
Microsoft

Re: KPI showing incidents today vs yesterday, week and month

@CraigC

 

Assuming that we have a Date column and an Incident Count column. We can create two calculated measures as below.

 

Inc_Today = 
CALCULATE ( SUM ( Table1[Incident_Count] ), Table1[Date] = TODAY () )
Inc_Yesterday = 
CALCULATE ( SUM ( Table1[Incident_Count] ), Table1[Date] = TODAY () - 1 )

KPI showing incidents today vs yesterday, week and month_1.jpg

 

Best Regards,
Herbert

CraigC Helper I
Helper I

Re: KPI showing incidents today vs yesterday, week and month

Hi unfortunately i dont have a count of incidents column. I simply have an open date and a close date and neither of them are linked to a date table. I can link them to a date table but then how would i create the KPI measure for today vs yesterday?

CraigC Helper I
Helper I

Re: KPI showing incidents today vs yesterday, week and month

That worked perfectly. Thank you!

 

How would i then translate that to this week vs last week and this month vs last month?

Microsoft
Microsoft

Re: KPI showing incidents today vs yesterday, week and month

@CraigC

 

You can create a week column and a month column, then using the similar DAX formula to do it.

 

Best Regards,
Herbert

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors