Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

mdx wont resolve null value

$
0
0

when i exec the following mdx,

with member [Measures].[rec_check] as
iif(isempty([Measures].[_Acctdtl Transaction Count]),0,1)
SELECT [Measures].[rec_check] on columns
FROM [Main Transaction Detail] WHERE ([COB Date Attr].[COB Date].&[20130201])

I get the expected result of 1 since the returned count is not null

rec_check

      1

However if I change the where clause to a date not in my cube and run this query

with member [Measures].[rec_check] as
iif(isempty([Measures].[_Acctdtl Transaction Count]),0,1)
SELECT [Measures].[rec_check] on columns
FROM [Main Transaction Detail] WHERE ([COB Date Attr].[COB Date].&[20130202])

then I get "(null)" but my conditional should have made it a 0

rec_check

   (null)

What is wrong ?  Thankyou for your help!


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>