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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Chris2016
Resolver I
Resolver I

Value is not computed if row is missing

Hi,

I have the following issue in a table where Projects, Users assigned to projects and User Level are displayed:

ProjectUserUser Level
A1Junior
A2Senior
A3Medium
A4Junior
A5Medium
A6Senior
B7Junior
B8Senior
B9Junior
B10Senior
C11Senior
A12Junior
A13Senior
C14Senior
C15 
B16 
B17Senior
 18 
 19 
 20 

 

 

 

I need to create a matrix where I can show if all existing projects have at least 3 users assigned per each User Level. Basically I am creating a measure to display the deltas per each project that does not have at least 3 Users per each User Level.

The issue is that the table is missing some rows for User Level, and also some Users do not have a User Level specified. I am flagging the non-specified User Levels as "Missing Level" in the calculation, but I do not have a solution for the cases where the table is not containing a User Level (for example, project B is missing User Level "Medium").

 

I tried calculating a new table using ADDMISSINGITEMS and SUMMARIZECOLUMNS, but that is not producing the missing rows in User Level per project (at least not by following the syntax specified in the official documentation ADDMISSINGITEMS function (DAX) - DAX | Microsoft Learn)

 

My calculations are:
Calculated column:

# Users per User Skill =
var blankproj = 'Table'[Project]= BLANK()
return
IF(blankproj, BLANK(),
CALCULATE ([# Users],ALLEXCEPT('Table', 'Table'[Project], 'Table'[User Level])))

Measures:

# Users = DISTINCTCOUNT('Table'[User])
 
# Missing Users per Project-User Level = 
var projnotblank = SELECTEDVALUE('Table'[Project])<> BLANK()
Var Levelnotspecified = SELECTEDVALUE('Table'[User Level]) = BLANK()
var result =
SWITCH(TRUE(), projnotblank && Levelnotspecified, "Missing level", projnotblank && MAX([# Users per User Skill])<3,3-MAX([# Users per User Skill]))
return result

These are the results:

Chris2016_0-1711706930731.png

In  the # Users matrix, we see that only Project A - Junior and Senior, and Project B - Senior have the desired number (3) of Users per those User Levels. In the below matrix, where the deltas are shown we see that number 3 is missing in Project B - Medium and Project C - Junior and Medium, because those User Level rows do not exist in the table.

Any idea how I can go about to create a matrix that displays the deltas even for those missing rows?

Many thanks!

 

1 ACCEPTED SOLUTION
Zang_Mi
Resolver II
Resolver II

Hello @Chris2016,


Since there are missing rows in the fact table, I will create two dimension tables to enable returning values for those missing rows in the matrix.

New calculated tables:

 

 

/* Generate a dimension table keeping blank values */
DimProject = DISTINCT('Table'[Project]) 
or
/* Generate a dimension table excluding blank values */
DimProject = FILTER(DISTINCT('Table'[Project]), 'Table'[Project] <> BLANK())

 

 

/* Generate a dimension table keeping blank values */
DimUserLevel = DISTINCT('Table'[User Level]) 
or
/* Generate a dimension table excluding blank values */
DimUserLevel = FILTER(DISTINCT('Table'[User Level]), 'Table'[User Level] <> BLANK())

 


And relate then with the fact table, then we can use data fields from the dimension tables as rows and columns in the matrix visual.

Zang_Mi_0-1711711256177.png


New measure:

 

# Missing Users per Project-User Level = 
var projnotblank = SELECTEDVALUE('DimProject'[Project]) <> BLANK()
Var Levelnotspecified = SELECTEDVALUE('DimUserLevel'[User Level]) = BLANK()
var result =
SWITCH(TRUE(), projnotblank && Levelnotspecified, "Missing level", projnotblank && MAX([# Users per User Skill])<3,3-MAX([# Users per User Skill]))
return result

 


Result:

Zang_Mi_1-1711711786941.png

View solution in original post

2 REPLIES 2
Zang_Mi
Resolver II
Resolver II

Hello @Chris2016,


Since there are missing rows in the fact table, I will create two dimension tables to enable returning values for those missing rows in the matrix.

New calculated tables:

 

 

/* Generate a dimension table keeping blank values */
DimProject = DISTINCT('Table'[Project]) 
or
/* Generate a dimension table excluding blank values */
DimProject = FILTER(DISTINCT('Table'[Project]), 'Table'[Project] <> BLANK())

 

 

/* Generate a dimension table keeping blank values */
DimUserLevel = DISTINCT('Table'[User Level]) 
or
/* Generate a dimension table excluding blank values */
DimUserLevel = FILTER(DISTINCT('Table'[User Level]), 'Table'[User Level] <> BLANK())

 


And relate then with the fact table, then we can use data fields from the dimension tables as rows and columns in the matrix visual.

Zang_Mi_0-1711711256177.png


New measure:

 

# Missing Users per Project-User Level = 
var projnotblank = SELECTEDVALUE('DimProject'[Project]) <> BLANK()
Var Levelnotspecified = SELECTEDVALUE('DimUserLevel'[User Level]) = BLANK()
var result =
SWITCH(TRUE(), projnotblank && Levelnotspecified, "Missing level", projnotblank && MAX([# Users per User Skill])<3,3-MAX([# Users per User Skill]))
return result

 


Result:

Zang_Mi_1-1711711786941.png

This is great, thanks so much for your help, much appreciated!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.