cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jagostinhoCT
Post Patron
Post Patron

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

View solution in original post

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors