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
eroyle
Frequent Visitor

Creating a calculation to see how long it took a person to reach a goal

Hello,

I am trying to create a calculation in Power BI to calculate how long it took for one person to reach a goal of 12 individual widgets.  A sample of the data (de-identified) is attached.  We have a goal of 12 widgets in 12 weeks, so I'm hoping I can calculate how long it took each "person" to reach this goal of 12 widgets and from there I can filter out those in 12 weeks and even create filters for the others who we would label as Not meeting goal.  Hopefully, this makes sense.  The file is in excel and I do have a calendar table as well.

Hoping to have a column for either "weeks to 12" or if needed "days to 12" and from there I can calculate out weeks.  Thank you in advance!!!

 

DateRegionLocationPerson NameUnique Identifier to CountPerson ID
3/6/2023EMEALocation ABCSteven SmithJKFM3H00570025CPerson 220
9/12/2022EMEALocation ABCJohn FarrellJKFM3K007600064Person 36
12/12/2022EMEALocation ABCJohn SmithJKFM3H00570020EPerson 101
3/13/2023EMEALocation ABCJohn SmithJKFM3H005700263Person 101
2/13/2023EMEALocation ABCJohn SmithJKFM3H005700247Person 101
2/13/2023EMEALocation ABCJohn SmithJKFM3H005700246Person 101
8/29/2022EMEALocation ABCJohn SmithJKFM3H00570018CPerson 101
12/12/2022EMEALocation ABCJohn SmithJKFM3H00570020DPerson 101
2/6/2023EMEALocation ABCJohn SmithJKFM3K0076000B6Person 101
3/21/2022EMEALocation ABCBill BarrJKFM3H00570008DPerson 105
3/21/2022EMEALocation ABCBill BarrJKFM3H00570008CPerson 105
3/21/2022EMEALocation ABCBill BarrJKFM3H00570008EPerson 105
6/20/2022EMEALocation ABCBill BarrJKFM3H0057000FEPerson 105
6/20/2022EMEALocation ABCBill BarrJKFM3H0057000FFPerson 105
4/4/2022EMEALocation ABCBill BarrJKFM3H0057000BEPerson 105
4/4/2022EMEALocation ABCBill BarrJKFM3H0057000BBPerson 105
6/20/2022EMEALocation ABCBill BarrJKFM3H0057000FCPerson 105
5/9/2022EMEALocation ABCJohn DoeJKFM3H0057000ECPerson 71
8/8/2022EMEALocation ABCJohn DoeJKFM3K007600048Person 71
9/19/2022EMEALocation ABCJohn DoeJKFM3K00760006CPerson 71
11/21/2022EMEALocation ABCJohn DoeJKFM3K007600091Person 71
9/19/2022EMEALocation ABCJohn DoeJKFM3K00760006BPerson 71
6/20/2022EMEALocation ABCJohn DoeJKFM3H005700102Person 71
7/25/2022EMEALocation ABCJohn DoeJKFM3H00570015BPerson 71
10/10/2022EMEALocation ABCJohn DoeJKFM3K007600071Person 71
10/24/2022EMEALocation ABCJohn DoeJKFM3K007600083Person 71
11/7/2022EMEALocation ABCJohn DoeJKFM3K007600089Person 71
11/21/2022EMEALocation ABCJohn DoeJKFM3K007600093Person 71
11/21/2022EMEALocation ABCJohn DoeJKFM3K00760008FPerson 71
11/28/2022EMEALocation ABCJohn DoeJKFM3K007600094Person 71
1/16/2023EMEALocation ABCJohn DoeJKFM3K0076000A9Person 71
2/13/2023EMEALocation ABCJohn DoeJKFM3H00570024BPerson 71
9/19/2022EMEALocation ABCJohn DoeJKFM3K00760006APerson 71
1/23/2023EMEALocation ABCJohn DoeJKFM3K0076000ADPerson 71
2/13/2023EMEALocation ABCJohn DoeJKFM3K0076000B9Person 71
8/8/2022EMEALocation ABCJohn DoeJKFM3K007600049Person 71
11/7/2022EMEALocation ABCJohn DoeJKFM3K007600088Person 71
1/30/2023EMEALocation ABCJohn DoeJKFM3K0076000AFPerson 71
1/30/2023EMEALocation ABCJohn DoeJKFM3K0076000B0Person 71
6/27/2022EMEALocation ABCJohn DoeJKFM3H005700116Person 71
7/18/2022EMEALocation ABCJohn DoeJKFM3H005700146Person 71
7/18/2022EMEALocation ABCJohn DoeJKFM3H005700147Person 71
9/5/2022EMEALocation ABCJohn DoeJKFM3K007600059Person 71
10/10/2022EMEALocation ABCJohn DoeJKFM3K007600077Person 71
1/16/2023EMEALocation ABCJohn DoeJKFM3K0076000A7Person 71
1/16/2023EMEALocation ABCJohn DoeJKFM3K0076000A8Person 71
2/27/2023EMEALocation ABCJohn DoeJKFM3K0076000E4Person 71
10/31/2022EMEALocation ABCJohn DoeJKFM3K007600086Person 71
11/14/2022EMEALocation ABCJohn DoeJKFM3K00760008DPerson 71
1/30/2023EMEALocation ABCJohn DoeJKFM3K0076000B1Person 71
2/27/2023EMEALocation ABCJohn DoeJKFM3K0076000DFPerson 71
7/25/2022EMEALocation ABCJohn DoeJKFM3H00570015APerson 71
11/7/2022EMEALocation ABCJohn DoeJKFM3K00760008APerson 71
1/23/2023EMEALocation ABCJohn DoeJKFM3K0076000AAPerson 71
6/20/2022EMEALocation ABCJohn DoeJKFM3H005700105Person 71
10/17/2022EMEALocation ABCJohn DoeJKFM3K007600079Person 71
10/31/2022EMEALocation ABCJohn DoeJKFM3K007600087Person 71
12/5/2022EMEALocation ABCJohn DoeJKFM3K007600098Person 71
7/4/2022EMEALocation ABCJohn DoeJKFM3H00570011EPerson 71
7/25/2022EMEALocation ABCJohn DoeJKFM3H005700158Person 71
10/17/2022EMEALocation ABCJohn DoeJKFM3K007600082Person 71
2/20/2023EMEALocation ABCJohn DoeJKFM3H00570024CPerson 71
2/6/2023EMEALocation ABCJohn DoeJKFM3K0076000B2Person 71
3/20/2023EMEALocation ABCJohn DoeJKFM3K0076000EDPerson 71
3/20/2023EMEALocation ABCJohn DoeJKFM3K0076000ECPerson 71
3/20/2023EMEALocation ABCJohn DoeJKFM3K0076000EBPerson 71
4/25/2022EMEALocation ABCJoanne DoeJKFM3H0057000DBPerson 107
4/18/2022EMEALocation ABCJoanne DoeJKFM3H0057000D7Person 107
11/14/2022EMEALocation ABCJoanne DoeJKFM3H0057001F1Person 107
10/17/2022EMEALocation ABCBob MarleyJKFM3H0057001DBPerson 109
3/28/2022EMEALocation ABCBob MarleyJKFM3H00570009CPerson 109
4/4/2022EMEALocation ABCBob MarleyJKFM3H0057000B3Person 109
4/4/2022EMEALocation ABCBob MarleyJKFM3H0057000AEPerson 109
4/25/2022EMEALocation ABCBob MarleyJKFM3H0057000DAPerson 109
4/25/2022EMEALocation ABCBob MarleyJKFM3H0057000D9Person 109
3/28/2022EMEALocation ABCBob MarleyJKFM3H00570009DPerson 109
2 REPLIES 2
eroyle
Frequent Visitor

Sorry, right after posting I realized I only gave you the fact table.  I also have created a summary table using this and another to have each Person listed only 1 time including their earliest Widget date and the total volume.  Looking for another column HERE that shows Weeks to 12 Widgets and the summarize DAX is here:  

PersonSummaryDetail = SUMMARIZE(Persons,Persons[Person2],Persons[Person Identifier],Persons[Shortened Identifier],'ALL Person'[Certification_Date],'ALL Person'[Earliest WIDGET_DATE],"Total_Widgets",DISTINCTCOUNT(HCA_WIDGETS[WIDGET_ID]))



Shortened IdentifierCertification_DateEarliest WIDGET_DATEProcedure Count
Person 3610/19/2021 0:001/31/2022 0:00107
Person 1711/8/2021 0:0011/8/2021 0:0077
Person 3511/9/2021 0:001/31/2022 0:0077
Person 472/16/2022 0:003/7/2022 0:0065
Person 674/25/2022 0:004/25/2022 0:0058
Person 4010/19/2021 0:002/7/2022 0:0053
Person 66/22/2021 0:007/19/2021 0:0053
Person 35/19/2021 0:006/21/2021 0:0049
Person 7111/5/2021 0:005/9/2022 0:0049
Person 109/13/2021 0:009/13/2021 0:0046
Person 1025/2/2022 0:005/2/2022 0:0042
Person 5410/27/2021 0:003/7/2022 0:0037
Person 2412/7/2021 0:0012/13/2021 0:0036
Person 6810/15/2021 0:005/16/2022 0:0029
Person 9611/17/2021 0:009/26/2022 0:0026
Person 311/13/2022 0:001/17/2022 0:0025
Person 8312/30/2021 0:004/25/2022 0:0025
Person 929/7/2022 0:009/12/2022 0:0024
Person 8212/30/2021 0:004/25/2022 0:0023
Person 10311/3/2021 0:0010/10/2022 0:0022
Person 45/19/2021 0:006/28/2021 0:0022
Person 792/23/2022 0:007/4/2022 0:0022
Person 149/29/2021 0:0010/25/2021 0:0021
Person 4110/26/2021 0:002/14/2022 0:0021
Person 1610/8/2021 0:0011/8/2021 0:0020
Person 382/6/2022 0:002/7/2022 0:0020
Person 4411/30/2021 0:002/21/2022 0:0020
Person 6310/27/2021 0:004/25/2022 0:0020
Person 26/16/2021 0:006/21/2021 0:0019
Person 5312/10/2021 0:002/21/2022 0:0019
Person 1116/17/2022 0:007/4/2022 0:0018
Person 6412/7/2021 0:004/25/2022 0:0018
Person 774/1/2022 0:006/20/2022 0:0018
Person 11310/12/2022 0:0010/31/2022 0:0017
Person 15712/6/2022 0:001/16/2023 0:0017
Person 918/27/2022 0:008/29/2022 0:0017
Person 159/29/2021 0:0010/25/2021 0:0016
Person 56/22/2021 0:007/19/2021 0:0016

Hi @eroyle ,

As checked your description for some times, I still not clear about your requirement. Do you want to get the required week number when the people reach the goal of 12 widgets? Could you please provide some raw data in the table 'Persons','ALL_Person' and 'HCA_WIDGETS'(exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.