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
MurVeman
Helper I
Helper I

Divide function is showing blank results

Hello all,

 

I am deviding the records from a colum "TestDefID" by counting the records with various statuses (Defect Correction in Process", "In Process", "Information Required", "Solution Proposal", "Forwarded", "Tester Action", "Wait for Defect Correction", "Confirmed", "Build Block", "Withdrawn","New") with records from the same table coum "UniqueTestCaseDescription" by counting deferent statuses("Pass", "InProgress", "Fail"). Here is the formula that i am using. Please take a look and advise.

(Formula = Total number of records with specific status/Total number of records with specific status*100)

Here is the Dax formula : - 

 

DefectDensity =
CALCULATE(
DIVIDE(
CALCULATE(
DISTINCTCOUNT(VR_DefectsManster[TestDefID]),
VR_DefectsManster[TestDefStatusText] IN {"Defect Correction in Process", "In Process", "Information Required", "Solution Proposal", "Forwarded", "Tester Action", "Wait for Defect Correction", "Confirmed", "Build Block", "Withdrawn","New"}
),
CALCULATE(
DISTINCTCOUNT(VR_DefectsManster[Unique]),
VR_DefectsManster[DefectsStatsGrouping] IN {"Pass", "InProgress", "Fail"}
)))

 

Please let me know if you need any aditional details for better ubderstanding. 

1 ACCEPTED SOLUTION
MurVeman
Helper I
Helper I

@Anonymous 

 

Resolved, formula was correct, there was a problem with relationships. 

View solution in original post

5 REPLIES 5
MurVeman
Helper I
Helper I

@Anonymous 

 

Resolved, formula was correct, there was a problem with relationships. 

rajendraongole1
Super User
Super User

Hi @MurVeman -  create a measure to calculate the Defect Density and to ensure it correctly filters.

DefectDensity =
VAR DefectCount =
CALCULATE(
DISTINCTCOUNT(VR_DefectsManster[TestDefID]),
VR_DefectsManster[TestDefStatusText] IN {
"Defect Correction in Process", "In Process", "Information Required",
"Solution Proposal", "Forwarded", "Tester Action",
"Wait for Defect Correction", "Confirmed", "Build Block",
"Withdrawn", "New"
}
)

VAR TestCaseCount =
CALCULATE(
DISTINCTCOUNT(VR_DefectsManster[Unique]),
VR_DefectsManster[DefectsStatsGrouping] IN {
"Pass", "InProgress", "Fail"
}
)

VAR Result =
IF(
TestCaseCount > 0,
DIVIDE(DefectCount, TestCaseCount, 0) * 100,
BLANK()
)

RETURN
Result

 

Once the above measure created, you can add percentage by enabling the % icon in measure tools by selecting the created measure

rajendraongole1_0-1719394974102.png

 

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi Rajendra,

 

Thank you for taking time out for helping me. I have tried with the solution, it is still showing blank. Please see the scheenshot below. 

MurVeman_1-1719400896775.png

 

Anonymous
Not applicable

HI @MurVeman,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Hi @Anonymous,

 

Thanks for your reply.

 

I have updated the approach to calculate the defect density now, but still no luck. Here is the new formula and sample data.

 

DefectDensity =
CALCULATE(
DIVIDE(
CALCULATE(
DISTINCTCOUNT(VR_DefectsManster[TestDefID]),
VR_DefectsManster[TestDefStatusText] IN {"Defect Correction in Process", "In Process", "Information Required", "Solution Proposal", "Forwarded", "Tester Action", "Wait for Defect Correction", "Confirmed", "Build Blocked", "New"}
),
CALCULATE(
COUNT('VR_PlanTesterTable'[Merged-UniqueID]),
VR_PlanTesterTable[StatusGrouping]IN {"Pass", "InProgress", "Fail"}

)))

 

Table - VR_PlanTesterTable

Merged-UniqueIDTCaseOverallStatusTextStatusGroupingTPlanID
GPS - PPE;MMPR-Min maint;S-PPE-003-001#PR min checkOKPassGPS - PPE
GPS - PPE;MMPR-Min maint;S-PPE-003-002#PR min checkOKPassGPS - PPE
GPS - PPE;MM PR min check - IPPF;S-PPE-006-001#PR min check - IPPFOKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-026#SO - BULK - M1 ItalyOKInProgressGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-025#SO - PROMO - M2 FashionOKInProgressGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-024#SO - BULK - M2 FashionOKInProgressGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-023#SO - BULK - M2 AustraliaOKFailGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-022#SO - BULK - M2 CanadaOKFailGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-021#SO - BULK - M1 UKOKFailGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-020#SO -PROMO- M1 UKOKFailGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-006#SO - PROMO - M1.5 ChinaOKFailGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-005#SO - PROMO - M1.5 South KoreaOKFailGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-027#SO - BULK - M1 SpainOKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-028#SO - BULK - M2 IsraelOKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-001#SO - PROMO - M1 JapanOKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-002#SO - PROMO - M1 SpainOKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-003#SO - BULK - M1 JapanOKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-002#SO - PROMO - M1 Spain1OKPassGPS - PPE
GPS - PPE;Sales order creation;S-PPE-001-003#SO - BULK - M1 Japan2OKPassGPS - PPE

 

Table 2 - VR_DefectsManster

TestDefIDTestDefStatusTextMerged-UniqueIDDefectsStatsGroupingTPlanID
8000009121Defect Correction in ProcessGPS - PPE;MMPR-Min maint;S-PPE-003-001#PR min checkClosedTP_ACCESS_MGMT
8000009234Defect Correction in ProcessGPS - PPE;MMPR-Min maint;S-PPE-003-002#PR min checkClosedTP_S4_TRAINING
8000009243NewGPS - PPE;MM PR min check - IPPF;S-PPE-006-001#PR min check - IPPFClosedTP_S4_TEMPLATE_BUILD
8000009281In ProcessGPS - PPE;Sales order creation;S-PPE-001-026#SO - BULK - M1 ItalyClosedTP_S4_W1SP3_SOURCE TO PAY
8000009287In ProcessGPS - PPE;Sales order creation;S-PPE-001-025#SO - PROMO - M2 FashionClosedTP_S4_W1SP3_ORDER TO CASH
8000009293Information RequiredGPS - PPE;Sales order creation;S-PPE-001-024#SO - BULK - M2 FashionClosedTP_S4_W1SP3_ORDER TO CASH
8000009294Information RequiredGPS - PPE;Sales order creation;S-PPE-001-023#SO - BULK - M2 AustraliaClosedTP_S4_W1SP3_ORDER TO CASH
8000009297Build BlockedGPS - PPE;Sales order creation;S-PPE-001-022#SO - BULK - M2 CanadaClosedTP_S4_W1SP3_ORDER TO CASH
8000009298Solution ProposalGPS - PPE;Sales order creation;S-PPE-001-021#SO - BULK - M1 UKClosedTP_S4_W1SP3_TREASURY
8000009299Solution ProposalGPS - PPE;Sales order creation;S-PPE-001-020#SO -PROMO- M1 UKClosedTP_S4_W1SP3_TREASURY
8000009300ForwardedGPS - PPE;Sales order creation;S-PPE-001-006#SO - PROMO - M1.5 ChinaClosedTP_S4_W1SP3_ORDER TO CASH
8000009308ForwardedGPS - PPE;Sales order creation;S-PPE-001-005#SO - PROMO - M1.5 South KoreaClosedTP_S4_W1SP3_ORDER TO CASH
8000009311Tester ActionGPS - PPE;Sales order creation;S-PPE-001-027#SO - BULK - M1 SpainClosedTP_S4_W1SP3_PLAN TO REALIGN
8000009312Tester ActionGPS - PPE;Sales order creation;S-PPE-001-028#SO - BULK - M2 IsraelClosedTP_S4_W1SP3_PLAN TO REALIGN
8000009315Wait for Defect CorrectionGPS - PPE;Sales order creation;S-PPE-001-001#SO - PROMO - M1 JapanClosedTP_S4_W1SP3_TREASURY
8000009316ConfirmedGPS - PPE;Sales order creation;S-PPE-001-002#SO - PROMO - M1 SpainClosedTP_S4_W1SP3_TREASURY
8000009316ConfirmedGPS - PPE;Sales order creation;S-PPE-001-002#SO - PROMO - M1 SpainClosedTP_S4_W1SP3_TREASURY

 

Thanks again 🙂

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors