Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Modifier including in Master Measure

Hi Guru's,

I have 2 Set  Modifiers  stored in variables. iam calculating YTD value  using below variables

1. vJ_DateModifier  =

sum({<

JType={'Value'},

FactType={'Essbase_J'},

Flag_J_Refinement={'1'},

$1

>} J_Refinement_Data)

2.vSetYTDModifier =

[FactDate]=,[Day]=,[Weekday]=,[Year]=,[Month]=,[MonthName]=,[Quarter]=,[_DateSerial]=,[_MonthSerial]=,

[_QuarterSerial]=,[_WeekSerial]=,[_Qvc.Calendar_DateIsFuture]=,[Year-Month]=,[Year-Quarter]=,

[_DateSerial] = {"<=$(=Max({1<$(_f_DateIsFuture)={0}

,_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)>}[_DateSerial]))"},

[Year] = {"$(=Max({1<$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)>}[Year]))"}

QTD calculation: $(vJ_DateModifier2)(vSetYTDModifier))


using above expression in Master measure to calculate the YTD



If i use like below its showing correct value but if i use like $(vJ_DateModifier2)(vSetYTDModifier)) in master items its showing wrong value.how to simplyfy the YTD calculation using above two variables.


working script:


sum({<

JType={'Value'},

[FactDate]=,[Day]=,[Weekday]=,[Year]=,[Month]=,[MonthName]=,[Quarter]=,[_DateSerial]=,[_MonthSerial]=,

[_QuarterSerial]=,[_WeekSerial]=,[_Qvc.Calendar_DateIsFuture]=,[Year-Month]=,[Year-Quarter]=,

[_DateSerial] = {"<=$(=Max({1<$(_f_DateIsFuture)={0}

,_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)>}[_DateSerial]))"},

[Year] = {"$(=Max({1<$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)>}[Year]))"},

FactType={'Essbase_J'},

Flag_J_Refinement={'1'},

$1

>} J_Refinement_Data)

Thanks,

Raj

3 Replies
rubenmarin

Hi Raj, that's because each comma will be considered as a parameter separator, it will need additional $'s:

sum({<

JType={'Value'},

FactType={'Essbase_J'},

Flag_J_Refinement={'1'},

$1, $2, $3, $4... // Fill to cover all parameters

>} J_Refinement_Data)

Anonymous
Not applicable
Author

Hi Ruben ,


Thanks for your time,i have 17 comma's in my set Modifier variable. do i need to use  $1,$2,........$17  in my $(vJ_DateModifier?



2.vSetYTDModifier =

[FactDate]=,[Day]=,[Weekday]=,[Year]=,[Month]=,[MonthName]=,[Quarter]=,[_DateSerial]=,[_MonthSerial]=,

[_QuarterSerial]=,[_WeekSerial]=,[_Qvc.Calendar_DateIsFuture]=,[Year-Month]=,[Year-Quarter]=,

[_DateSerial] = {"<=$(=Max({1<$(_f_DateIsFuture)={0}

,_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)>}[_DateSerial]))"},

[Year] = {"$(=Max({1<$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)>}[Year]))"}

rubenmarin

When you do the call $(vJ_DateModifier2)(vSetYTDModifier)), vSetModifier is:

$(vJ_DateModifier2([FactDate]=,[Day]=,[Weekday]=,[Year]=,[Month]=,[MonthNa...))

This are interpreted as different parameters, so vJ_DateModifier2 needs to have a place to store them. $1 for the first parameter, $2 for the second...