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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DakotaGoblinMan
Frequent Visitor

Percentage of Parts Returned By Month

Hello,

 

I have two different data sources. One chart is our "usage" for a part, by month for the past 5 years, formated as seen below.

 

part usage.jpg

 

 

 

 

 

 

 

I also have part return data, with a "Assembly Date" which is the same date as when the part is used in the previous table.

 

Which would consist of the following:

Item NoAssembly Date
AB12/2/22
AB110/5/20
AB45/6/19
Etc.Etc.

 

What i am trying to make is a table/graph that would show a part return percentage by month/year such as the following.

Part No.2019202020212022
AB15%10%15%20%
AB240%20%10%1%
Etc.1%1%1%1%

 

What would be the best way to start this? I am fine with just being pointed in the right direction instead of the answer being handed to me. 

 

Thank you

2 REPLIES 2
changqing
Resolver II
Resolver II

Hi @DakotaGoblinMan ,

 

It seems that the first table is not needed in the model? My steps are as follows:

1.  New a carlendar table:

changqing_0-1660205747986.png

2. Relationship:

changqing_1-1660205798742.png

3. New a measure:

Measure = 
VAR _count = COUNT('Table'[Item No])
VAR _count_all = CALCULATE(COUNT('Table'[Item No]),ALL('Calendar'))
VAR _result = DIVIDE(_count,_count_all) + 0
RETURN
_result

4. Result:

changqing_0-1660205647446.png

5. The PBIX file is attached for reference:

Pbix file

 

Best Regards,
changqing

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. I cannot help you without meaningful sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.