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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MarkButterfield
New Member

Dax Scoring System

Hi everyone,

I want to calculate a score based on whether data is present or absent in my dataset.

A.
Personal Email Address = 50 points
If Personal Email is N/A = 10 points
If Personal Email is Blank = 0 points

B. 
Business Email Address = 50 points
If Business Email is N/A = 10 points
If Business Email is Blank = 0 points

C.
Preferred Email Address = 50 points
If Preferred Email is "No" = 0 points

Therefore the total maximum score would be 50+50+50 = 150

Every time I've written an IF(ISBLANK expression, blank values have still been calculated as 50 points.
It should be, for instance, A=50 + B=0 + C=50 = 100
I've ensured that the data is trimmed so blank values are ensured.

Please can somebody suggest a formula which would accurately calculate a total within a single field?

I tried this and numerous variants to no avail:
Contact Score =
IF(ISBLANK('YourTable'[Personal Email]) || 'YourTable'[Personal Email] = "N/A", 10, IF(ISBLANK('YourTable'[Personal Email]), 0, 50))
+ IF(ISBLANK('YourTable'[Business Email]) || 'YourTable'[Business Email] = "N/A", 10, IF(ISBLANK('YourTable'[Business Email]), 0, 50))
+ IF(ISBLANK('YourTable'[Preferred Email]), 0, 50)



Thanks in advance!




9 REPLIES 9
HotChilli
Super User
Super User

ISBLANK() returns false with an empty string. You probably want to rewrite with a comparison to "".

Uzi2019
Super User
Super User

Hi @MarkButterfield 
can you simply write below calulation
Score = 
var E= If(ISBLANK(Personal Email),0,If([Personal Email]="N/A",10),50)
var B= If(ISBLANK(Business Email),0,If([Business Email]="N/A",10),50)
var P= If([Preferred Email]="NO", 0,50)
Return E+B+P

If my post helps please give kudos and accept it as solution!
Thanks

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi, 

Thanks for this. I used this formula, but had to add closed parentheses on Var E And B for the formula to be accepted.
However, even after this formula, I still get an incorrect value.

I created 3 new columns to check whether the values were being read correctly, and that raised no issues.
I really thought that this would be a simple calculation! 
I'm still getting a score of 100 when the personal and preferred email columns are blank and "No" respectively

Hi @MarkButterfield 

I have taken your sample data set.
I got the desired result. please create the following Measure :

 

Total Score =
var B=IF(MIN('Email Score'[Business Email])="",0,IF(MIN('Email Score'[Business Email])="N/A",10,50))
Var P= IF(MIN('Email Score'[Personal Email])="",0,IF(MIN('Email Score'[Personal Email])="N/A",10,50))
var Q= IF(MIN('Email Score'[Preferred Email])="" || MIN('Email Score'[Preferred Email])="N/A",0,50)
Return (B+P+Q)
 

Uzi2019_1-1698414040459.png

 

If I answered your question please give kudos and accept it as a solution!
Thanks

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi @MarkButterfield 
Did you try above solution ???
I have tested with your dataset.

IF my post helps please give kudos and accept it as  asolution!
Thanks

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi @MarkButterfield 

If you want to handle ISBLANK() with prefered email then use below calculation

var E= If(ISBLANK(Personal Email),0,If([Personal Email]="N/A",10),50)
var B= If(ISBLANK(Business Email),0,If([Business Email]="N/A",10),50)
var P= If(ISBLANK[Preferred Email] || [Preferred Email]="No",0,50)
Return E+B+P

 

If my post helps please give kudos and accept it as a solution!
Thanks

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
MarkButterfield
New Member

With the formula I outlined above, when the:
Business email contains a value
Personal email is blank
Preferred email is blank

I should be getting a score of 50
But I'm currently getting 100

Some part of the formula must be incorrect?
Or if the formula works correctly, I need to somehow edit my underlying data!

MarkButterfield
New Member

Hi,

Thanks for your reply!
Based on the scoring system outlined above, the total score would adjust based on the data available:

Business EmailPersonal EmailPreferred EmailContact Score
"123@gmail.com""456@gmail.com"Business150
"789@gmail.com"N/ABusiness110
"123@hmail.com" Business100
"456@hmail.com"  50
   0

 

HotChilli
Super User
Super User

Can you provide some sample data please and show the desired result?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.