Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i need small help , i am caluclating the YOY growth in stright table so i have a list box with values like 2017Q1 to 2018Q3 so the expression which i used is working fine with single selection but when i tried to select multiple values the result is showing null ... how to avoid this ? below is my expresion
HW YoY Growth : =IF(Quarter = vNewMaxQtr,(($(vHWFCYOYServ)- $(vHWRevYOYServ)) / $(vHWRevYOYServ)), (($(vHWACTYOYServ)-$(vHWRevYOYServ)) / $(vHWRevYOYServ))
Current Quarter: HW Forecast / HW Revenue
**********************************************************************************************************************************************************************************
vHWFCYOYServ = if(max(Dimensionality())=1,
sum({$<Quarter={$(vCurQtr)},Service_PL={'HWR'},Type={'HW Forecast SR'}>}Service_Amount),
if(max(Dimensionality())=2,
sum({$<Quarter={$(vCurQtr)},Service_PL={'HWR'},Type={'HW Forecast SSR'}>}Service_Amount),
if((Dimensionality())=0,
sum({$<Quarter={$(vCurQtr)},Service_PL={'HWR'},Type={'HW Forecast SR'},Sub_Region=>}Service_Amount)+sum
({$<Quarter={$(vCurQtr)},Service_PL={'HWR'},Type={'HW Forecast SSR'},sub_sub_region=>}Service_Amount))))
vHWRevYOYServ = Sum({$<Quarter={$(vPrevQtr)},Type={'HW Actuals'}>}Hardware_Revenue_Amt)
can anyone have idea please help on this?
thanks
Chanty
I recommend to add Distinct inside Concat() to be sure to have unique values in case you select multiple values..
you mean this?
or where i need to have the distinct?
vCurQtr: =chr(39)&concat(distinct Quarter,chr(39)&','&chr(39))& chr(39)
and
vPrevQtr: =chr(39)&concat(distinct(Left(Quarter,4)-1)&Right(Quarter,2),chr(39)&','&chr(39)) & chr(39)
wherever you need to use concat to be able to put multiple values inside set analysis for example
No need to have duplicated values (it can cause problems)
So on both expression (don't know which one will work).
Thanks Youssef. first let me validate with the data if i got anything wrong will try as you suggested.
That' fine - Please close this thread