Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikexperts,
Below If condition with multiple set expression is not displaying the value.
Scenario:
TerritoryDesc=Alpha -->it need to execute the First Set Expression ,or Else Statement.
IF Statement with multiple Set Expression:
if(TerritoryDesc='Alpha',sum({$<Version_Desc = {'Adjustment','Actual'},SalesType_Key={'1'},SalesPeriod = {1},Calendar_Half_Year_Eng={'Jul-Dec'},BusinessArea=P(BU),Calendar_Month = {'<=$(=max(Calendar_Month))'},Day_of_Week=,CP_Team_Flag = {'CP','ORG'},Product_Group_Code -= {'ENCG','ENTG'}>}Sales_Value)/1000,
sum({$<Version_Desc = {'Adjustment','Actual'},SalesType_Key={'1'},SalesPeriod = {1},Month={'*'},Calendar_Month = {'<=$(=max(Calendar_Month))'},Day_of_Week=,CP_Team_Flag = {'CP','ORG'},Product_Group_Code -= {'ENCG','ENTG'}>}Sales_Value)/1000)--->End of IF Statement
Even tried with Variable :
if(SAP_TerritoryDesc='Kottayam',Vsup,Vex)
Is this used in a chart where you have TerritoryDesc as dimension? Also, does this show anything if no selections are made?
1 mistake detected. replace ' by " double quotes in date set analysis
Calendar_Month = {"<=$(=max(Calendar_Month))"}
single quotes are for literal matches i.e. equal to something definte
also is star a value below? if not same change
Month={'*'}
Here we are using straight tablee month and product is the dimension,condition enabling also there
Actually I need Q3 onwards(July to dec) sales value make it as 0 because territory desc=alpha merze with some other territory so there is no salesvalue for July onwards
Vsup:variable
sum({$<Version_Desc = {'Adjustment','Actual'},SalesType_Key={'1'},SalesPeriod = {1},Month={'*'},Calendar_Month = {'<=$(=max(Calendar_Month))'},Day_of_Week=,CP_Team_Flag = {'CP','ORG'},Product_Group_Code -= {'ENCG','ENTG'}>}Sales_Value)/1000)
The above exp showing sales value for all months
Vex:variable
sum({$<Version_Desc = {'Adjustment','Actual'},SalesType_Key={'1'},SalesPeriod = {1},Calendar_Half_Year_Eng={'Jul-Dec'},BusinessArea=P(BU),Calendar_Month = {'<=$(=max(Calendar_Month))'},Day_of_Week=,CP_Team_Flag = {'CP','ORG'},Product_Group_Code -= {'ENCG','ENTG'}>}Sales_Value)/1000
The above exp limit the July to Dec sales value 0
if(TerritoryDesc='alpha',Vsup,Vex)
That what I need these both into if condition
Any ideas or any other way to write the expression
Sunny plz help me on this
Thanks
Hi dilip,
That not an issue here,that exp working fine only
your issue may be here:
BusinessArea=P(BU)
I will check on this let you know
pin var wrote:
Here we are using straight tablee month and product is the dimension,condition enabling also there
Could there be more than one distinct value of TerritoryDesc per month/product combination?
No Marco.....