February 11, 2015 at 11:27 am
Hi experts!!
I need your help.
I have a Time dimension with a hierarchy.
I have a headache. 🙁
In my Time dimension I have an attribute "Is Working Day France" that flag if it is a holiday date or not ("Yes or No"
I am writtig this scipt but it doesn't work.
with member measures.CountOfHolidaysDay as
Count( FILTER( Descendants ( [Date].[Calendar]
, [Date].[Calendar].[Calendar Date]
) , [Date].[Is Working Day France].MEMBERVALUE = "Yes"
) )
Can U please help me
February 11, 2015 at 12:05 pm
Lidou123 (2/11/2015)
Hi experts!!I need your help.
I have a Time dimension with a hierarchy.
I have a headache. 🙁
In my Time dimension I have an attribute "Is Working Day France" that flag if it is a holiday date or not ("Yes or No"
I am writtig this scipt but it doesn't work.
with member measures.CountOfHolidaysDay as
Count( FILTER( Descendants ( [Date].[Calendar]
, [Date].[Calendar].[Calendar Date]
) , [Date].[Is Working Day France].MEMBERVALUE = "Yes"
) )
Can U please help me
Try this:
with member measures.CountOfHolidaysDay
as
Count
(
Descendants
(
[Date].[Calendar].currentmember
, [Date].[Calendar].[Calendar Date]
)
* {[Date].[Is Working Day France].&[Yes]}
)
I've made 2 changes to your original query:
The first is the inclusion of "currentmember"...the calculation needs to be aware of where you currently are (i.e. what level you are looking at in the hierarchy).
The second is using a crossjoin (denoted by "*{}"). You can only use the Filter() function if you are using a measure value to filter by. For dimension members, use the crossjoin.
February 15, 2015 at 3:39 pm
Thank U Martin.
Thats works good !!!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply