Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculated column returning NaN and infinity

I'm trying to create a calculated column in my dataset using the following formula:

 

PercentHoursRemaining = ('column1'[Hours_Actual]) / ('column2'[hours_budget])
 
Both columns are of data type Decimal Number and have very few non-zero values. The resulting calculated column, however, returns a vast majority of values as "NaN' or 'infinity'. I'm fairly confident this isn't an issue of diving by zero nor is it a data type issue as I've exhausted both of those possibilities.
 
I have also tried entering in the above formula into the "New Measure' function instead but received the following error:
 
A single value for column 'Hours_Actual' in table 'v_rpt_Project' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
 
I'm a new PowerBI user so these are all the things I can think of to troubleshoot this. Any help would be much appreciated.
 
Thanks in advance!

4 Replies