Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, I need help in converting the below expression into pick and match. Also if multiple month's are selected the output should be '-'.
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))))
This is an urgent requirement please help.
create the key for all conditions and using single pick match condition to evaluate multiple expression
Example:-
Load *,
USER&'-'&Region&'-'&Country as Key;
LOAD * INLINE [
USER, Region, Country
1,USA, ABC,
2, USA, XYZ,
3, AUS, PQR
4, IND, FGH
5, USA, ERT
1,RSA, TYU
1, SL, FGG
1, BAN, ERT
];
pick(wildmatch(Key,'1-USA-ABC','2-USA-XYZ','3-AUS-PQR','4-IND-FGH','5-USA-ERT'),
sum(1),
sum(2),
sum(3),
sum(4),
Sum(5)
)
Actually this expression needs to be added in KPI in chevrons and according to filter selection this should work. I tried Pick and match but with one FY selection and multiple MONTH selection it's giving the output of FY selected ideally it should show '-'
ok, try like this
pick(wildmatch(GetSelectedCount(Country)&'-'&GetSelectedCount(Region)&'-'&GetSelectedCount(USER),'1-0-0','2-1-0','1-0-0','0-0-0','1-0-1'),
sum(1),
sum(2),
sum(3),
sum(4),
Sum(5)
)
For Selection 2-1-0 (2 country,1 Region, 0 User)
if no criteria matches it displays '-' null .