cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## Add 1 to denominator if cell is not null

Hello Everybody,

I am working with a likert scale question (Strongly Agree = 5 ... Strongly Disagree = 1) for 9 different questions.  The goal is to take the average score for each question asked after I quantify each response.  However, there are some questions that do not have a response.  So, it is possible someone has been surveyed 4 times but one question could only have 2 responses, so I would only want to divide that specific metric question by 2 instead of 4.  These unanswered questions have null in the cells.  Any help on a formula for this would be much appreciated.

Eventually, I will want to sum up all of the responses divided by the times each question was answered to give us a true avg for each employee's performance.

1 ACCEPTED SOLUTION
Helper I

Just for anybody seeing this, I used a variable and if statements to find the solution and it has worked correctly so far!

Denominator Count =
VAR Denom = 0

Return

IF(NOT(ISBLANK(Timely)), Denom +1, Denom + 0) + IF(NOT(ISBLANK(Trustworthy)), Denom + 1, Denom + 0) ....

4 REPLIES 4
Community Support

Hi @Ryanb2412 ,

You could add a filter to ignore blank values.

``FILTER('Table', 'Table'[Value]<> BLANK())``

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

Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Helper I

Sorry, hopefully this is more clear.

Below, I have multiple rep surveys for one rep.  They are scored on 4 metrics below.  I want to find their total avg score, making sure that "null" values are not included in the denominator.

Ex:

 Rep Survey Date Timely Trustworthy Sales Demos John Doe 1/1/20 5 5 4 null John Doe 2/1/20 3 5 null 3 John Doe 3/1/20 4 3 2 null

The desired total avg would be 3.78.  This is calculated by adding all values to = 34 and dividing it by only the 9 cells containing values.  I need to find a measure to create that will omit nulls from any denominator.

Helper I

Just for anybody seeing this, I used a variable and if statements to find the solution and it has worked correctly so far!

Denominator Count =
VAR Denom = 0

Return

IF(NOT(ISBLANK(Timely)), Denom +1, Denom + 0) + IF(NOT(ISBLANK(Trustworthy)), Denom + 1, Denom + 0) ....

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors