Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am trying to generate results using below expression. The results are totally fine when selecting a week year but they are totally wrong when not filtering because the selection of the date below is not taking the master calendar of the same row.
Expression :
count({<
[Country] = {'test'},
[Nationality] = {'test'},
[Group Engagement Date] = {"<=$(=date($(vMasterCalendar)))"},
[Group Termination Date] = {">=$(=date($(vMasterCalendar)))"},
[Assignment SDate] = {"<=$(=date($(vMasterCalendar)))"},
[Assignment EDate] = {">=$(=date($(vMasterCalendar)))"},
[Person SDate] = {"<=$(=date($(vMasterCalendar)))"},
[Person EDate] = {">=$(=date($(vMasterCalendar)))"},
[Person Type Category] -= {'Daily Hired'}
/>}distinct [Employee Number])
vMasterCalendar : =only({<Year=P(Year),Quarter=P(Quarter),[Month Year]=P([Month Year]),[Week Year]=P([Week Year]),[Month Num]=P([Month Num]),Month=P(Month),Day=P(Day)>}Num([Master Calendar Date]))
Results : Capture attached right number highlighted in yellow and the results are fine when choosing a week year but they are wrong when we don't make any filter (Wrong Numbers Attach)
it's working fine now thanks for the help sunny
count({<
[Country] = {'test'},
[Nationality] = {'test'},
[Person Type Category] -= {'Daily Hired'}
>
}distinct (if( [Group Engagement Date] <= [Master Calendar Date]
and [Group Termination Date] >= [Master Calendar Date]
and [Assignment SDate] <= [Master Calendar Date]
and [Assignment EDate] >= [Master Calendar Date]
and [Person SDate] <= [Master Calendar Date]
and [Person EDate] >= [Master Calendar Date] ,[Employee Number])))
This should work also,
Count({<[Country] = {'test'}, [Nationality] = {'test'}, [Employee Number] = {"=
[Group Engagement Date] <= [Master Calendar Date]
and [Group Termination Date] >= [Master Calendar Date]
and [Assignment SDate] <= [Master Calendar Date]
and [Assignment EDate] >= [Master Calendar Date]
and [Person SDate] <= [Master Calendar Date]
and [Person EDate] >= [Master Calendar Date]
"}, [Person Type Category] -= {'Daily Hired'}>} DISTINCT [Employee Number])