x

Calculate the SUM of the NULL Values in MDX

Hello

I would like to calculate the number of working days, where nothing happened. Similar to calculating the number of days where there were no sales, but I would like to exclude Saturdays and Sundays from the equation. This will tell me how busy my store is and which days it isn't busy.

I have managed to identify "somewhat" the values, but now I need to SUM them, and feel that my scope is not right in order for the aggregate to work on the level that I need it to.

In the screenshot below, you'll see that if I show .ALLMEMBERS, then I can see the days that I need to add for the month by the "1" that I've put in my IIF statement by flagging the NULL values. What I now need to do is SUM them, so that when I go up a level and look at things in a [Month] level, then it aggregates all those values.

alt text

Any assistance in this regard will be greatly appreciated.

mdx1.png (34.8 kB)
more ▼

asked Apr 11 at 02:59 PM in Default

avatar image

carelg
1

@carelg It is not easy to figure out what you would like to actually happen from the screenshot. Posting the original query as text (not as image) and proving desired results in addition to the screenshot would help.

Apr 12 at 05:16 PM Oleg
(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x220
x104

asked: Apr 11 at 02:59 PM

Seen: 17 times

Last Updated: Apr 12 at 05:16 PM

Copyright 2018 Redgate Software. Privacy Policy