Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Imagine I have field called "Source_Type" which contains value like 'X','Y' and 'Z'.We have a key field in our table which called as %KeyItem. I want to know whether we have data for each of the above Source_Type against the %KeyItem against the month of June. If it is available we will mark is as "Yes" and if not is not available we will mark it as "No".
Can someone please help me to achieve this?
Try like
Load
Source_Type,
%KeyItem,
if( Match( Right( %KeyItem&Source_Type,1),'X','Y','Z' ) and Month = Month(Today() ) ,'Yes','No') as MarkFlag
From Location;
Thank You!
We cannot do at the load script level. We would like to do at the chart level. Please suggest
try this:
if(count({<SourceType={'X'}>} %KeyItem) > 0, 'YES',
if(count({<SourceType={'Y'}>} %KeyItem) >0,'YES',
if(count({<SourceType={'Z'}>} %KeyItem) > 0,'YES'),'NO'))
Use below expression in chart but it works based on dimension what you had taken
if(Match( Right(%KeyItem&Source_Type,1),'X','Y','Z') and Month = 'Jun' ,'Yes','No')