![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I am using sql 2000 AS. Working on a retailing cube where in all the distributors has a property called "Coverage Day". This is the weekday when we get the data from the distributor for his weekly sale. Now I want to show the no of coverage days for a month. If I am looking at data of 3rd July, which is monday, then all the distributors who has coverage day as Monday shud show "Coverage Days" measure as 1. In case I am looking at july 06 (full month) the distributor shud show "Coverage Days" measure as 5 (july 06 has 5 mondays). I have added a property called "Week day" to my time dimension's Date level. I tried to copmpare the properties of selected distributors and selected time, but couldn't succeed. IIF([Distributors].CurrentMember.Properties("Coverage Day") = [Time].CurrentMember.Properties("Week Dy"),1,0) I know this is the primary level MDX and I need to add lot of IIFs to it, but for me even this basic qury is not working. Can anyone suggest me the MDX/other solution for the above problem? thanks. |
#3
| |||
| |||
|
|
MDX has two IIF functions, one testing and returning integer and another testing and returning string: http://msdn.microsoft.com/library/de...intro_6n5f.asp maybe the problem could be that you ask for returning a number but testing two strings. Try this IIF([Distributors].CurrentMember.Properties("Coverage Day") = [Time].CurrentMember.Properties("Week Dy"), "YES" ,"NO") "k_s" wrote: Hi all, I am using sql 2000 AS. Working on a retailing cube where in all the distributors has a property called "Coverage Day". This is the weekday when we get the data from the distributor for his weekly sale. Now I want to show the no of coverage days for a month. If I am looking at data of 3rd July, which is monday, then all the distributors who has coverage day as Monday shud show "Coverage Days" measure as 1. In case I am looking at july 06 (full month) the distributor shud show "Coverage Days" measure as 5 (july 06 has 5 mondays). I have added a property called "Week day" to my time dimension's Date level. I tried to copmpare the properties of selected distributors and selected time, but couldn't succeed. IIF([Distributors].CurrentMember.Properties("Coverage Day") = [Time].CurrentMember.Properties("Week Dy"),1,0) I know this is the primary level MDX and I need to add lot of IIFs to it, but for me even this basic qury is not working. Can anyone suggest me the MDX/other solution for the above problem? thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |