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

8 REPLIES 8
v-haibl-msft
Employee
Employee

@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

Thank you, that's exactly what I needed.

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?

Greg_Deckler
Super User
Super User

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

 

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

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

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)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

That worked perfectly. Thank you!

 

How would i then translate that to this week vs last week and this month vs last 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
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.

Top Solution Authors