Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I looking to optimize the below KPI expression for better app performance but couldn't figure out a solution. Your help is highly appreciated. I just want to reduce the calculation since the same calculation is being repeated for all 5 cases. Is it possible to calculate only only time with the help of pick and match to increase the performance. This is the urgent requirement. Please help.
if(GetSelectedCount(MONTH)=0 and GetSelectedCount(QUARTER)=0 and GetSelectedCount(FY)=0
and getselectedcount(DATE)=0,
((count({<MONTH={'$(curr_moonth)'},VAL_CDE*={"*abc"}>}VAL_CDE)/
count({1<MONTH={'$(last_month)'},VAL_CDE*={"*abc"}>}VAL_CDE))-1)*100,
if(GetSelectedCount(MONTH)=1 and GetSelectedCount(QUARTER)=0 and GetSelectedCount(FY)=0
and getselectedcount(DATE)=0,
((count({<VAL_CDE*={"*abc"}>}VAL_CDE)/
count({1<MONTH={'$(prev_month)'},VAL_CDE*={"*abc"}>}VAL_CDE))-1)*100,
if(GetSelectedCount(MONTH)=0 and GetSelectedCount(QUARTER)=1 and GetSelectedCount(FY)=0
and getselectedcount(DATE)=0,
((count({<VAL_CDE*={"*abc}>}VAL_CDE)/
count({1<QUARTER={'$(quarter_name)'},VAL_CDE*={"*abc"}>}VAL_CDE))-1)*100,
if(GetSelectedCount(MONTH)=0 and GetSelectedCount(QUARTER)=0 and GetSelectedCount(FY)=0
and getselectedcount(DATE)>=1,
((count({<DATE= {">=$(=date(min(DATE)))<=$(=date(max(DATE)+1))"},VAL_CDE*={"*abc"}>}VAL_CDE)/
count({1<DATE= {">=$(=date(min(DATE)-(max(DATE)-min(DATE))-1))<=$(=date(max(DATE)-(max(DATE)-min(DATE))))"},VAL_CDE*={"*abc"}>}VAL_CDE))-1)*100,
if(GetSelectedCount(MONTH)=0 and GetSelectedCount(QUARTER)=0 and GetSelectedCount(FY)=1
and getselectedcount(DATE)=0,
((Count({<MONTH= {">=$(=Yearstart(max(MONTH),0,4))<=$(=Yearend(max(MONTH),0,4))"},VAL_CDE*={"*abc"}>}VAL_CDE)/
Count({1<MONTH={">=$(=Yearstart(max(MONTH),-1,4))<=$(=Yearend(max(MONTH),-1,4))"},VAL_CDE*={"*abc"}>}VAL_CDE))-1)*100)))))
first simplify your expression.
keep every set expression into variable and replace it for all expressions then keep final expression also into a variable and use that variable into your expresssion.
I guess replacing the set expression will just simplify the expression but won't help in optimization.
Have you tried ? is it still same issue?
Yes same issue. Any possible solution where we can use pick and match to optimize the apps performance. So that the KPI charts get loaded quickly. Like there are many if statements used that is causing the problem.