cancel
Showing results for 
Search instead for 
Did you mean: 

Handling null values in date dimension

03-22-2021 11:05 PM
2483 views 5 comments
0 Likes
SAP Managed Tags
Subscribe

I have created a formula for a measure in my model which looks something like this ;

So when both or one of my dates are null the value should be set to -999. But it turns out no matter how I write the formula ISNULL fails to recognize that the date is null. Any suggestions? Here is what my data looks like in the table component in the story. The last column below shows the value from the formula above which is set to 0 since both date columns (the first two) used in the formula are null. When both date columns are null the measure should show -999.

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Thanks, Saurabh.

I found a workaround to the ISNULL() function. I am checking if the date is greater than "1/1/1000" and that seems to work for me. During the model creation all null values are either dropped or replaced with "#" so what is the purpose of ISNULL() function. I couldn't get it to show me with If date ="#" either.

saurabh_sonawane
Active Contributor
0 Likes

Hi

Try get table data in variable

var result = table1.getdatasource().getsresultset();

use console.logt to check what values does your date field is having

console.log(result)

after that use that in your formula

Mostly it would be undefined in the date field where it is blank but plz get check onces

Thanks,

Saurabh S.