Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
facing issue with flag, please help what I did wrong.
This is my table... (I'm trying to create flag, if market is 1 value should be 838 and if APH_MKT is 1 value should be 249)
IF(Market=1, 'Genaral', IF(APH_MKT=1, 'APH', 'N/A')) as Flag
ID | APH_MKT | Market | Sales |
1 | 0 | 1 | 200 |
2 | 0 | 1 | 300 |
3 | 1 | 1 | 230 |
4 | 1 | 1 | 19 |
5 | 0 | 1 | 89 |
Thanks in Advance
is there any possibility ??
Your description shows, the condition should be like this,
IF(Market=1, 838, IF(APH_MKT=1, 249, 'N/A')) as Flag
this is not static, it should be dynamic..
If records are increase will based on data.
I understand now. Check this.
Pick(Match(-1,APH_MKT=1,Market=1),Sum(TOTAL{<APH_MKT={1}>} Sales),Sum(TOTAL{<Market={1}>} Sales))
Hi Saran,
i have to create falg like below, but this condition only satisfying for APHSS not for General market.
Pick(Match(-1,APHSS_MKT=1, GM=1),'APHSS', 'General Market') as Comparison;
Screen1: without any selection
Screen2: with Selection APHSS, working fine
Screen3: for General Market, it should map to everything, because in data whole column is 1
Hope you understand..
This is the one solution, but my data is very huge - I can't concatenate
Is there any other solution??
ABC:
LOAD *, 'APH' as flag where APH_MKT=1;
LOAD * INLINE [
ID, APH_MKT, Market, Sales
1, 0, 1, 200
2, 0, 1, 300
3, 1, 1, 230
4, 1, 1, 19
5, 0, 1, 89
];
CONcatenate
LOAD *, 'General Market' as flag;
LOAD * INLINE [
ID, APH_MKT, Market, Sales
1, 0, 1, 200
2, 0, 1, 300
3, 1, 1, 230
4, 1, 1, 19
5, 0, 1, 89
];