MDX -Children count function Not working in Case statement

Hi,
I am trying to create set when you slice with the Hierarchy member is leaf level , I want a output only that Leaf level .
and When I slice with  the parent level , it has to give all the members below that parent level.
But the problem here is when I select child member or leaf member , The first condition in the Case is not working
WITH SET
TESTSET AS
CASE
WHEN
 [Dimension].[Hierarchy].currentmember.children.count<0
THEN
 [Dimension].[Hierarchy].currentmember
ELSE
 DESCENDANTS([Dimension].[Hierarchy].Currentmember,,AFTER)
END
SELECT
WBSSET ON 1,
{} on 0
FROM
 (SELECT {[Dimension].[Hierarchy].&[10]} ON COLUMNS FROM [CubeName])
Thanks,
Santosh

Hi Santosh,
I don't think Children count function not working in case statement, I have tested it on my local environment, here s the sample query for you reference.
with member
testset as
case
when
[Geography].[Geography].currentmember.children.count<10
then "X"
else "OK"
end
select testset on 0,
{[Geography].[Geography].[Country].members} on 1
from
[Adventure Works]
In your scenario, the issue might be caused by the query isself, you can try to use IsLeaf Funcion to achieve your requirement. Please refer to the links below.
http://msdn.microsoft.com/en-us/library/ms144932.aspx
http://www.databasejournal.com/features/mssql/article.php/3633696/MDX-Operators-The-IsLeaf-Operator--Conditional-Logic-within--Calculations.htm
http://www.mdxpert.com/Functions/MDXFunction.aspx?f=22
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • Count function not working

    Hi everyone,
    ok what i am trying to do is use a count to count the number of times an object was accessed on just a certain day by a certain user... but i only want each day to show up one time in the report and just have the count number to the right of it...
    here is a link to what my app looks like i blacked out the confidential stuff but all that is the same username and object name anyone know how i can change my code??
    http://i237.photobucket.com/albums/ff39/taproot1206/apprep.jpg
    Edited by: Daniel Garcia on Dec 15, 2008 10:10 AM

    Ok this is what i have
    Object Name|| User || Last Used On || Count
    AP Invoices     ||Anderson, Ebony ||05-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||05-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||08-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||08-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||08-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||08-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||08-DEC-08 || 0
    AP Invoices     ||Anderson, Ebony ||12-DEC-08 || 0
    Group Claims Data Warehouse     ||Andrade, Dario ||19-NOV-08 || 0
    Group Claims Data Warehouse     ||Andrade, Dario     ||19-NOV-08 || 0
    Group Claims Data Warehouse     ||Andrade, Dario     ||11-DEC-08 || 0
    Group Claims Data Warehouse     ||Andrade, Dario     ||11-DEC-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     ||17-NOV-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     ||17-NOV-08     || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     ||17-NOV-08     || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     ||17-NOV-08     || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     ||19-NOV-08     || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 19-NOV-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 21-NOV-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 21-NOV-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 01-DEC-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 01-DEC-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 03-DEC-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 03-DEC-08 || 0
    Group Claims Data Warehouse - IT     ||Andrade, Dario     || 11-DEC-08 || 0
    My desired result is
    Object Name || User || Last Used On || Count
    AP Invoices     || Anderson, Ebony || 05-DEC-08 || 2
    AP Invoices     || Anderson, Ebony || 08-DEC-08 || 5
    AP Invoices     || Anderson, Ebony || 12-DEC-08 || 1
    Group Claims Data Warehouse     || Andrade, Dario     || 19-NOV-08 ||     2
    Group Claims Data Warehouse     || Andrade, Dario || 11-DEC-08     || 2
    Group Claims Data Warehouse - IT     || Andrade, Dario     || 17-NOV-08     || 4
    Group Claims Data Warehouse - IT     || Andrade, Dario     || 19-NOV-08      ||4
    Group Claims Data Warehouse - IT || Andrade, Dario     || 21-NOV-08     || 2
    Group Claims Data Warehouse - IT     || Andrade, Dario     || 01-DEC-08     || 2
    Group Claims Data Warehouse - IT     || Andrade, Dario     || 03-DEC-08     || 2
    Group Claims Data Warehouse - IT     || Andrade, Dario     || 11-DEC-08     || 1
    Edited by: Daniel Garcia on Dec 15, 2008 12:25 PM
    Edited by: Daniel Garcia on Dec 15, 2008 12:39 PM

  • Not able to sign into Blackberry Protect. Backup and Restore function not working. "Your device isn't associated with a Blackberry ID"

    Not able to sign into Blackberry Protect.  Backup and Restore function not working. Message is: "Your device isn't associated with a Blackberry ID."  My Blackberry Messenger and Blackberry World is working fine so I am sure its not an ID issue on the phone.  I can sign into Link, Blackberry.com and Protect.  I see my device in Protect but cannot send messages or view it on a map.  Times out with cannot reach device message.  BB Protect on Device has a swirling circle beside the on/of switch.  Cannot turn off.  
    I have deleted Link and re-installed.
    I have reset phone to default(factory) and signed in. 
    OS level is 10.2.1.3062
    BB Link is 1.2.3.56
    Solved!
    Go to Solution.

    I managed to figure this out myself. I had to delete the device from the Blackberry Protect website.  protect.blackberry.com.  I wiped my device again and signed in with my Blackberry ID.  I dont know if the step of wiping was necessary as I did not try my backup with the current configuration on the device following the delete.  Restore is in progress for me!

  • NGS Sponsors authentication does not work in case user has non-English character in his password

    Hi,
    we are using the NAC Guest Server v 2.0.1 and have Sponsors authentication done through Radius servers. Radius servers are Microsoft IAS using AD.
    Sponsors user authentication works okay in case user's password includes English characters, but does not work in case an user uses national characters like for example Umlauts in German.
    On Radius server I can see these error messages:
    User XXXX was denied access.
    Reason = Authentication was not successful because an unknown user name or incorrect password was used.
    As soon as an user changes his password and uses English characters only, it resolves.
    I guess this might be that NGS uses different coding while sending a password to Radius server, but not sure.
    Appreciate if anyone knows a root cause and what could be a workaround. Unfortunately our AD policy allows users to use national characters and we can hardly change it. So a change on NGS or Radius side would be more viable.
    Many thanks for your help.

    A case has been opened at Cisco and it is now quite clear that it is a problem with coding.
    According to Cisco development team NGS uses UTF-8 coding to send the password, of course encrypted, to the Radius server. This cannot be changed within NGS. We use Radius Microsoft IAS Version 5.2.3790.3959 running on VMWare Windows 2003 SP2. More tests are scheduled to be performed.

  • In dubai FT,siri are not working in case when we move other country could we activate those feature in that country

    in dubai FT,siri are not working in case when we move other country could we activate those feature in that country

    Facetime is disabled in hardware per request of Dubai government. It
    will not work if you move to another country. If you move and wish to utilize
    Facetime, sell your iPhone before moving and get a new one at your new
    location.
    Apple has not announced if/when Siri will work in Dubai.

  • Copy/paste function not working in Firefox 22. Always good in previous versions

    Copy/paste function not working in Firefox 22. Always good in previous versions editions

    Well I've uninstalled FF22, thanks for the suggestion.
    Chrome works perfectly with ZA and C&P.

  • Why is the scroll function not working after accessing the voice feature in settings?

    Why is the scroll function not working after accessing the voice feature in settings?

    For some prerecorded audio files the Transpose slider will not work reliably. I found no clear pattern, when it does and when not.
    If all fails, create a loop from the audio file. Select the region in the track and use the command "File: Add region to Loop library".
    Set the current key and tempo, name the loop, and save the loop.
    Now add it from the loop browser to a new track and delete your old track. The search field in the Loop browser will help you to find the loop quickly.
    You will be able to transpose the sample as described above, like a regular loop.
    For example - a audio file turned into a loop and transposed:

  • Palm Desktop 6.2.2. and Lookup function not working in Windows 7

    Palm Desktop's lookup function not working in Windows 7 64bit. Please help.
    Post relates to: Centro (Verizon)
    This question was solved.
    View Solution.

    I was able to solve this by unchecking compatibility mode and setting the application to run as administrative.

  • Send & Recieve functionality not working with  WebDav after installing Acrobat XI

    Send & Recieve functionality not working with  WebDav after installing Acrobat XI for PDF.  Acrobat XI is complete installations(Trial Version).

    Hi Kiro ,
    Did you try opening that file in any other browser ?If not ,please try doing that once and see if that  works for you.
    Try Repairing Acrobat once and see if  that helps.
    Launch Acrobat>Navigate to Help>Repair Acrobat Installation.
    Regards
    Sukrit Dhingra

  • Keyboard + mouse functions not working

    After updating InDesign CC 6-days ago started to have issue with all keyboard + mouse functions not working ex. shift key does not constrain proportions when scaling. A restart fixed the issue thr first time. Today I have installed latest update and shut down and restarted several times does not fix issue. On a MacBook pro running OS X Mavericks 10.9.2.

    Disconnected extrenal devices ie keyboard and Wacom Bamboo tablet and restarted computer seemed to correct the issue.

  • The reproduction counter does not work correctly

    the reproduction counter does not work correctly

    Yes it is a bug, and no one is being lazy.
    People volunteer their time to bring you a mail client and as soon as there is anything like a problem, someone is being lazy. Seriously, that is not acceptable. Before commenting on the contributions of others, please advise what your contributions have been.
    Bug [https://bugzilla.mozilla.org/show_bug.cgi?id=1107844 1107844 ]refers

  • In my ipad zoom function not working..some day before it worked,but when i double pinch with my three fingers it zooms negligible, wat to do?plzz help me..

    In my ipad zoom function not working..some day before it worked,but when i double pinch with my three fingers it zooms negligible, wat to do?plzz help me..

    It works when I reset my all settings...
    Settings>general>reset>reset all settings
    It never delete ur all contacts and any others,but ur wallpaper and wifi connection will change..it can be as before...

  • HT204168 touch screen function not working when using facetime

    Why is my iPad touch screen function not working when using FaceTime?

    Hi megascones,
    I apologize, I'm a bit unclear on the exact nature or scope of the issue you are describing. If you are having issues with the touch screen on your iPad, you may find the troubleshooting steps outlined in the following article helpful:
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Regards,
    - Brenden

  • Why is my touch screen function not working when using facetime

    Why is my touch screen function not working when using facetime

    Hello megascones,
    After reviewing your post, it sounds like the screen is not responding to touch in one app. I would recommend that you read this article, it may be able to help the issue.
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Restart your device. If you can't restart, reset your device.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • HT1977 I bought apps. My kid delet that after few weeks. Then I have downloaded to same ipad. But some functions not working.

    I purchase some apps, my son deleted some. But I have download again from cloud. But some functions not working ask me to pay again. How can I use functions without paying again.   Thank you

    Search around on the app settings and see if there's a "Restore purchases" option.

Maybe you are looking for

  • Adding New table to the existing page

    Hi, i have a task i.e i have to create a new UI(consista table structure) and add to the existing page.How can do this one.If any one knows please respond asap. This is urgent requirement. Thanks in advance. Bye Palakondaiah

  • What are the benefits of compiling in a fakeroot environment? [SOLVED]

    Out of curiosity, what exactly are the benefits of compiling packages in a fakeroot environment?  There are a couple packages I've had to compile manually before running makepkg because they wouldn't compile in a fakeroot environment, and was just wo

  • Printing an External PDF

    I have a highly graphical PDF with a PRINT button on it. I want to be able to have it print an external PDF from our site that is a simple Black and White version. Looking for some help to do this... Many thanks! Dave

  • Thumbnail not rendered in browser

    I lifted code posted in this forum for creating a jpg thumbnail courtesy of --Dmitri Don http://forum.java.sun.com/thread.jspa?threadID=223186 and it works fine to make a nice sharp image. I am having a problem with certain thumbnails not showing in

  • I have OS X 10.5.8, should I upgrade to Snow Leopard, or a later version?

    I have  OS X 10.5.8 on a 2008 Macbook Pro. Should I upgrade to Snow Leopard, or a later version?