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

Dax for matrix table

I have this table image below 

Kay_Kalu_0-1756197742109.png

 

Lookin to create a matrix table below 

Kay_Kalu_1-1756197742111.png

 

Total Checking Parent Count = Distinct count of unique checking_parent/JIRA_ID where the checking parent matches the "Checking Parent" column on this table

Total SQL Feedback = ( (Distinct count of unique checking_parent/JIRA_ID/feedback category = "SQL" /Item_ref where the checking parent matches the "Checking Parent" column on this table) 

Total SQL No Feedback = ( (Distinct count of unique checking_parent/JIRA_ID where the checking parent matches the "Checking Parent" column on this table) * (SQL Weighting for the "Checking Parent" colmun in the "Task Weighting" tab) ) - Minus cases from the "Total Feedback" column

I have been able to sort out Total Checking Parent Count and Total SQL Feedback from my previous post Just cant figure out how the lookup the value form Task weighting table. more context below

 

TotalSQLFeedback i haven't explained it well so below is a sample explained. thanks

 

jira_iditem_refcomment_datechecking_parentfeedback category
PPDQ-9506PR118/07/2025 16:52Population Review CheckSQL
PPDQ-9387PR101/07/2025 16:17Population Review CheckSQL
PPDQ-9387PR201/07/2025 16:17Population Review CheckSQL
PPDQ-9350PR116/06/2025 17:24Population Review CheckSQL
PPDQ-9225PR120/05/2025 17:21Population Review CheckSQL
PPDQ-9225PR101/07/2025 13:54Population Review CheckSQL

 

From the table above I have filtered the feedback category = "SQL" and checking_parent = Population Review Check then the count to get Total SQL Feedback will be distinct count of Item_ref in relation to the jira_id. e.g PPDQ-9387 will count as 2 but PPDQ-9225 will count as 1- Thiis have be solved then this below is the issue

 

Total SQL No Feedback = ( (Distinct count of unique checking_parent/JIRA_ID where the checking parent matches the "Checking Parent" column on the first table) * (SQL Weighting for the "Checking Parent" colmun in the "Task Weighting" table beow ) - Minus cases from the "Total Feedback" 

If I could be helped with DAX for this calculation it will help.

Checking ParentSQL WeightingBusiness WeightingProcess Weighting
Population Review Check327
Data Fix Driver File Checking123
P&C Request Checking014
CS/Suspense Handover Checking105
Bespoke Datafix Spec Checking004
Sweep Docs Checking233
Review Signoff206
Calc Flag Review Signoff205
Totals11837

Attached is the Task Weighting table. so it uses the weight "SQL Weighting" when the iteam_ref is SQL and so on. the checking_parent will be row filtered 

1 ACCEPTED SOLUTION
Shahid12523
Community Champion
Community Champion

Total SQL No Feedback =
VAR Parent = SELECTEDVALUE('FeedbackData'[checking_parent])
VAR JiraCount = CALCULATE(DISTINCTCOUNT('FeedbackData'[jira_id]), 'FeedbackData'[checking_parent] = Parent)
VAR SQLWeight = LOOKUPVALUE('TaskWeighting'[SQL Weighting], 'TaskWeighting'[Checking Parent], Parent)
RETURN (JiraCount * SQLWeight) - [Total SQL Feedback]


Counts distinct JIRA_IDs per Checking Parent
Multiplies by SQL Weighting from TaskWeighting
Subtracts your existing Total SQL Feedback measure

Shahed Shaikh

View solution in original post

2 REPLIES 2
Kay_Kalu
Helper I
Helper I

Thanks this has worked

Shahid12523
Community Champion
Community Champion

Total SQL No Feedback =
VAR Parent = SELECTEDVALUE('FeedbackData'[checking_parent])
VAR JiraCount = CALCULATE(DISTINCTCOUNT('FeedbackData'[jira_id]), 'FeedbackData'[checking_parent] = Parent)
VAR SQLWeight = LOOKUPVALUE('TaskWeighting'[SQL Weighting], 'TaskWeighting'[Checking Parent], Parent)
RETURN (JiraCount * SQLWeight) - [Total SQL Feedback]


Counts distinct JIRA_IDs per Checking Parent
Multiplies by SQL Weighting from TaskWeighting
Subtracts your existing Total SQL Feedback measure

Shahed Shaikh

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.

Top Solution Authors