Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61938

DAX formula to Excel Question - !NUM error

$
0
0

Hello All,

 

I have an excel related question about !NUM. I am using analysis services to create measures to build reports, etc. I have two measures based off two numbered columns basically counting how many times you did an act. So it could be How many Drinks today, How many Cookies today as the 2 columns. I basically summed both up to get totals and then divided them to get a %. There are 0's for certain days, etc. So when I pushed this to an excel report via a pivot table this column initially showed up as

!NUM. I realized this to be due to dividing by a 0.  So I altered my measure from a simple sum/sum to read:

If([Drinks]=0, Blank(),[Cookies]/[Drinks])

This worked. There would be values going through a month period and there were blank spots. It was suggested however that there be 0's instead of blanks. When I write this:

If([Drinks]=0, 0,[Cookies]/[Drinks])

I am now getting the !NUM again for whenever its zero's.

 

So I tried for my Drinks sum measure:

 Drinks=IF(ISBLANK(SUM[Drinks])),0,SUM([Drinks]) thinking I needed to address my denominator but this did not work either.

Any thoughts on how I could get this to work and rid myself of the **** !NUM ? I have to say i'm a bit confused as to why this works for the blanks but when I change it to zero's it flips out.  I tried this on other measures and the zero's show up too - so I find i have no idea yet as to why !NUM shows up.  The fields values are all set the same, etc.

 

Thanks for any insights you might be able to provide.


Viewing all articles
Browse latest Browse all 61938

Trending Articles



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