Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
24601
Frequent Visitor

KPI Achieved Measure

Hi

I am looking to create a measure that will allow me to see an KPI Achieved figure based on the following sample data. I have previously used a calculated column with an IF statement to give me 1 or 0 and then used a measure of that to get the average but I would like to remove the need for a calculated column if possible.

 

The below shows items for sale and the number of days taken from purchase to sale. For the KPI to be achieved the Days Taken must be lower than the Target Days. There will be multiple KPIs not just the one shown below. 

I need this to be able to be rolled up into monthly, quarterly, yearly, by sales person etc for performance management. 

Any help would be greatly apprecaited. If you need clarification please let me know. 

Thank you

 

24601_2-1641375690591.png

 

 

1 ACCEPTED SOLUTION

@24601 , My mistake , try this one

divide(Sumx(summarize(Table, Table[KPI], Table[Item#], Table[Start Date], "_1", [Achieved]),[_1]), countx(summarize(Table, Table[KPI], Table[Item#], Table[Start Date]),[KPI]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
24601
Frequent Visitor

Thanks @amitchandak 

I'm getting an error for the countx

24601_0-1641377889555.png

 

@24601 , My mistake , try this one

divide(Sumx(summarize(Table, Table[KPI], Table[Item#], Table[Start Date], "_1", [Achieved]),[_1]), countx(summarize(Table, Table[KPI], Table[Item#], Table[Start Date]),[KPI]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks very much. It's looks to have worked. Some issues on my side around duplicate entries. 

amitchandak
Super User
Super User

@24601 , Assume achcieved measure like

 

Achieved = if(sum(Table[days taken]) <=Sum(Table[Target]), 1, 0)

 

Achieved% measure

 

Achieved % =
divide(Sumx(summarize(Table, Table[KPI], Table[Item#], Table[Start Date], "_1", [Achieved]),[_1]), countx(summarize(Table, Table[KPI], Table[Item#], Table[Start Date])))

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.