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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sathyaganapathi
Regular Visitor

Calculate Percentage of Total count

Hi,

I have two tables.  

1st one contains overall data.   I will consider the count of ID  from this table for the Denominator.

2nd table contains data of specific problem.  The count of problem will be the neumerator.

 

In both the table data is stored on daily basis. 

Percentage of N need to be calculated for every month Like below.  I could do this with below formula.

percentage = COUNT(Table2[ProblemCount]) / COUNT(Table1[ID])

 

YearMonthCount of IDProblemCountpercentage
2022January532315.83%
2022February594437.24%
2022March792739.22%
2022April841809.51%
2022May617599.38%
2022June6417511.70%
2022July594569.35%
2022August580569.57%
2022September624507.89%
2022October617589.40%
2022November4025.00%

 

When drill down the month to next level (Dept), the calculation of Percentage should be based on the month total as Denominator.

Example for October 2022.  Denominator is 617.

DeptProblemCountpercentage
Copper274.38%
Drilling132.11%
Photo40.65%
Relam50.81%
SF20.32%
SM71.13%

 

Could somebody please help?

Thanks in advance.

8 REPLIES 8
jennratten
Super User
Super User

You're very welcome.  If this answered your question or helped please consider liking the reply and/or accepting it as a solution.

jennratten
Super User
Super User

Hello - in order for this percentage to be handled properly, in your measure you will have to evaluate whether or not various levels are visible using ISINSCOPE.  This is explained thoroughly with examples using SQLBI's hierarchy and percent of parent node patterns.  Please see this post.

https://www.daxpatterns.com/hierarchies/ 

Hi jennratten,

I will go through it and in case of doubts I shall get back..

Thank you for quick inputs.. 🙂

Anonymous
Not applicable

Hi @sathyaganapathi ,

 

Sorry to bother you, is your problem solved?
If it is solved, please mark the helpful replie as a solution, if not please provide sample data for two tables and expected results, I will try to help.

 

Best Regards,

Stephen Tao

 

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

 

Hi Stephen,

 

below is the output I am looking through drill down.

 

YearCount of OrderNoHold4Countpercentage
202112431088.69%
202265225959.12%

 

YearMonthCount of OrderNoHold4Countpercentage
2022January532315.83%
2022February594437.24%
2022March792739.22%
2022April841809.51%
2022May617599.56%
2022June6417511.70%
2022July594569.43%
2022August580569.66%
2022September625508.00%
2022October617589.40%
2022November891415.73%
  65225959.12%

 

Jan-22   
DeptCount of Order No.Hold4Countpercentage
Copper532193.57%
Drilling53230.56%
Photo53210.19%
Relam53230.56%
Route53210.19%
SF53220.38%
SM53210.19%
Tech53210.19%
 532315.83%

 

Please let me know if you need more info from me..

Also, please let me know how I can send the excel files?

Thank you..

Anonymous
Not applicable

Hi @sathyaganapathi ,

 

I hope you can provide some of the original data of your two tables. Because I don't know the quantitative correspondence between your ID and department. You can copy and paste into the reply as your previous reply. Remember that this is a public forum and protect your privacy.

 

Best Regards,

Stephen Tao

 

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

Hi Stephen Tao,

 

Please see the example data.  It is only few lines of data from the original table. 

The ID numbers is common on both the table. 

 

Table 1

IDInputDateTimeFileNameDateCodeOrderNoLotClearByLotClearTimeCycleTimeHold1
17610/28/21 10:11ZEA70524321600002299444Halesha. V.1/3/202267d 0h 47mTrue
27011/2/21 9:45BE2229432129-2ND T606000026547Akshay.N12/20/202148d 1h 1mTrue
27911/3/21 9:01IFM31404221605000273024Halesha. V.11/19/202115d 14h 59mTrue
28511/3/21 18:44RAI22014221605000273130Ramesh M B11/15/202111d 22h 27mTrue
28711/4/21 9:35PA97134421600002306637Srinivas K M11/7/20213d 4h 7mTrue
29111/4/21 13:15BE2244432130606000026602Akshay.N11/30/202125d 22h 41mTrue
32011/7/21 13:34IFM09434421600002305373Halesha. V.11/18/202110d 10h 26mTrue
32111/7/21 13:37SAS46914421600002294308Srinivas K M11/12/20215d 4h 31mTrue
32411/7/21 15:30SAS42614421600002296420Srinivas K M11/12/20215d 6h 53mTrue
32811/7/21 19:55SMC02654421605000272751Raghavendra.G.V12/13/202135d 14h 44mTrue
33011/7/21 21:51HRO89614421605000273957Thrinesha Aradhya12/20/202142d 13h 38mTrue
33611/8/21 12:24SAS68904421600002302308Srinivas K M11/12/20214d 10h 8mTrue
34411/8/21 21:48SAS37034421600002289048Srinivas K M11/12/20213d 19h 54mTrue
36211/9/21 21:22SAS46914521600002294296Srinivas K M11/12/20212d 21h 8mTrue
36411/9/21 22:31SAS46914521600002304248Thrinesha Aradhya12/20/202140d 13h 11mTrue
38111/10/21 14:30END00814421605000273258Thrinesha Aradhya12/20/202139d 21h 18mTrue
38511/10/21 18:08HLT049021303606000026409Srinivas K M11/18/20217d 15h 30mTrue
39011/11/21 8:11AAT71032144600002309295Halesha. V.12/2/202121d 1h 27mTrue
39111/11/21 8:20SFU27514421-2ND T605000273864Halesha. V.11/19/20218d 5h 25mTrue
39911/11/21 16:09API00534321606000026563Raghavendra.G.V12/21/202139d 22h 57mTrue
40111/11/21 17:32ESP66014321606000026553Halesha. V.12/22/202140d 18h 30mTrue

 

Table 2:

IDInputDateTimeFileNameDateCodeOrderNoHoldStatusHold DateDepartmentReasonReason RemarksAction ByBlockedAtHold StatusHoldCTCAPA StatusCAPA CTWeekMonthRelease DateCAPA Date
13########ZEA04484221600002289150          2142202110  
29########ZEA02524221600002295569          2142202110  
135########ZEA8563VCP-6X600002293396          2143202110  
136########ZEA8563VCP-6X600002277333          2143202110  
176########ZEA70524321600002299444Released########CopperLess PTHLess PTH in COMP(1.3mm) SPEC= MIN 25 ACTUAL-23.02DDA/AH/NVPlabReleased7CAPAReceived72143202110########11/4/2021
279########IFM31404221605000273024Released########CopperLess avg PTHLess avg pth in via (0.35 mm)

Spec Avg=20   Actual=19.62
DDA/AH/NVPlabReleased1CAPAReceived12144202111########11/4/2021
285########RAI22014221605000273130Released########SMMore SMMore sm on epoxy 

Spec Max 50  Actual = 52.69
TMK/MVM/KJS/SAPlabReleased2CAPAReceived82144202111########11/12/2021
287########PA97134421600002306637Released########CopperLess PTH & Surface CuLess Pth via (0.55 mm) 

Spec=Min=25   Actual=19.30

Less Pth Comp (1.55 mm) 

Spec Min=25 µm   Actual=21.57

Less surface cu  

Spec=Min=60   Actual= 58.06
DDA/AH/NVAQLReleased2CAPAReceived62144202111########11/10/2021
267########PIL11844221600002298565          2144202111  
270########BE2229432129-2ND T606000026547Released########RelamMore Dielcspec=min 55 max 81

actual=100.540
VGM/KDN/NVPlabReleased6CAPAReceived62144202111########11/8/2021
290########BE2228422124 -REFREE606000026473          2144202111  
291########BE2244432130606000026602Released########CopperMore PTHMore pth in comp(1.10 mm) 

Spec=Max=50  Actual =58.06
DDA/AH/NVPlabReleased5CAPAReceived62144202111########11/10/2021
303########SAS46914421600002294285          2144202111  

Hope this helps.  If not please let me know how I can send the excel files.

Thanks in advance..

Sathyaganapathi.

Hi Stephen Tao,

Sorry for the delay in replying..  I was in other training for few days and could not touch this. 

Here I want to send below two files.   

1. FinalInputLogFor%Calculation.xlsx - the overall table.

2. FinalInputLogDeptFor%Calculation.xlsx - contains Dept info related to each ID in 1st file.

 

Can you please help me to send this files to you?  by mail? or any other way?

Please let me know if you need more info from me.

Thanks in advance for your support.

Sathyaganapathi.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.