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
jagostinhoCT
Post Partisan
Post Partisan

KPI use previous month as target goals

trying to create a KPI visual on a "Warnings" metric but cannot seem to find out how to setup the Target Goals measure to work using the PREVIOUSMONTH function.

 

WarningsPreviousMonth = CALCULATE(SUM('Audits - Warnings'[GUID]),PREVIOUSMONTH('Audits - Warnings'[Date modified].[Date]))

 

I am certainly no getting it right, but just cannot figure out what. found this post and followed up on provided links but I still cannot fully understand how to apply that to my case.

 

Thank you

J

 

Warnings previous month.png

1 ACCEPTED SOLUTION

I found out what was going on.

the GUID was set as string so it is the COUNT function, not the SUM that I need to use.

 

Working now.

 

WarningsPreviousMonth = CALCULATE(COUNT('Audits - Warnings'[GUID]),PREVIOUSMONTH('Audits - Warnings'[Date modified]))

 

Many thanks for your help @v-juanli-msft

Smiley Happy

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @jagostinhoCT

Modify your formula as below

WarningsPreviousMonth = CALCULATE(SUM('Audits - Warnings'[GUID]),PREVIOUSMONTH('Audits - Warnings'[Date modified]))

Please have a look at my test

Measure = CALCULATE(SUM(Sheet1[guid]),PREVIOUSMONTH(Sheet1[date]))

6.png

 

 

 

Best Regards

Maggie

I found out what was going on.

the GUID was set as string so it is the COUNT function, not the SUM that I need to use.

 

Working now.

 

WarningsPreviousMonth = CALCULATE(COUNT('Audits - Warnings'[GUID]),PREVIOUSMONTH('Audits - Warnings'[Date modified]))

 

Many thanks for your help @v-juanli-msft

Smiley Happy

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.