Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Need a little help with my min max calculation. Does anyone see a problem with it? This is a calculated dimension. Thanks
if(aggr(sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt),[PC Desc]) /
aggr(sum(EmployeeCnt),[PC Desc]) >= $(vMin),[PC Desc] and
(aggr(sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt),[PC Desc]) /
aggr(sum(EmployeeCnt),[PC Desc]) <= $(vMax),[PC Desc])
Are you sure that you need all these aggr? All have the same dimension and therefore the following might be working, too:
aggr(if(
sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt) /
sum(EmployeeCnt) >= $(vMin) and
sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt) /
sum(EmployeeCnt) <= $(vMax),[PC Desc]),[PC Desc])
- Marcus
I think the red parenthesis at the start of the third line should be removed.
if(aggr(sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt),[PC Desc]) /
aggr(sum(EmployeeCnt),[PC Desc]) >= $(vMin),[PC Desc] and
(aggr(sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt),[PC Desc]) /
aggr(sum(EmployeeCnt),[PC Desc]) <= $(vMax),[PC Desc])
Are you sure that you need all these aggr? All have the same dimension and therefore the following might be working, too:
aggr(if(
sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt) /
sum(EmployeeCnt) >= $(vMin) and
sum({<DDDC_Days = {"< 0"}>} DDDC_Cnt) /
sum(EmployeeCnt) <= $(vMax),[PC Desc]),[PC Desc])
- Marcus
Thanks. Worked perfect.