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
sanal5677
Employee
Employee

Top 10 issues across tables considering variance & errors weightage

Problem Overview : I have run data for jobs which run daily. Each run has steps which are incremental and each step has duration logged against it. There are historical runs for each run which are mapped to a ParentAppId. The errors against each run is logged too. The historical runs mapped to a ParentAppId are mapped to a run and are used for calculating the duration variance for a run. I need to get the top 10 issues across all these tables considering any duration variance along with the errors and list out them. The top 10 issues should be looked by considering if there are more errors versus the variance.

For Ex:

1. If an error E2 has a count of 10 for a run and there is no variance then E2 is the top variance. 

2. If there is a duration variation of -30 say for StepID 1 and only 1 error E1 with count of 1 , then StepID 1 with variance of -30 is the top variance.

 

The different tables per below

1. RunData

RunIDStepIDDuration
11100
12200
21120
22300
3150
32100

 

2. ParentAppRunMapper

RunIDParentAppID
1A
2B
3A

 

3. Error

RunIDErrorCount
1E110
1E21
2E32
3E43

 

4. HistoricalRun

ParentAppIDStepIDDuration
A1120
A2180
B1150
B2200

 

5. StepDetails

StepIDStepName
1S1
2S2

 

6. TopIssues

IssueIDRunIDVarianceNameVarianceIssueType
11E110Error
21S1-20Variance
32S2-30Variance
42E23Error
53E33Variance

 

The first 5 tables will be used to derive the 6th table (TopIssues). Once the calculation is done using the DAX the output will be per the 6th table. The following calculations should be done :

- Duration variance between a run (RunData table) & its historical run data (HistoricalRun table)

- List out the top 10 issues (across the duration variance per above & error data for a run) to a new table (TopIssues table) for all runs .

 

I will use this to be listed out in the Smart Narrative visual per below:

Top issues for this run (RunID : 1) are per below:

- E1 error has occured 10 times

- S1 has a variance of 20 seconds more than the historical run

 

Question :

1. How can i write a DAX measure to calculate the duration variance across multiple tables

2. How can i write a DAX measure to arrive at the top 10 issues across the duration variance & errors by considering the weightage of the errors versus the duration variance.

 

Please find here the pbix file i have used.

 

 

0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors