Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I do not want to add if else in my expression as we are going through some standards.
Please help me to convert the below expression without If
if(GetSelectedCount([Employee])=1,
avg({<Level={3}, [Department Code]={2}, Country={'India'}>} Target),
if (GetSelectedCount(Department)=1,
avg({<Level={2}, [Department Code]={2}, Country={'India'}>} Target),
avg({<Level={1}, [Department Code]={2}, Country={'India'}>} Target)))
Give this a shot
Pick(Match(1, GetSelectedCount([Employee]), GetSelectedCount(Department)) + 1,
Avg({<Level={1}, [Department Code]={2}, Country={'India'}>} Target),
Avg({<Level={3}, [Department Code]={2}, Country={'India'}>} Target),
Avg({<Level={2}, [Department Code]={2}, Country={'India'}>} Target))
Give this a shot
Pick(Match(1, GetSelectedCount([Employee]), GetSelectedCount(Department)) + 1,
Avg({<Level={1}, [Department Code]={2}, Country={'India'}>} Target),
Avg({<Level={3}, [Department Code]={2}, Country={'India'}>} Target),
Avg({<Level={2}, [Department Code]={2}, Country={'India'}>} Target))
It works perfectly. Thank you very much.