Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Could you please help me in replacing the empty space with the word others.
I tried the mapping but it is not working:
mapservicestatus2:
mapping load * inline [
raison_refus_rendez-vous,Newraison_refus_rendez-vous
Null(), Autres
] ;
AS_XX_XXX:
ApplyMap('mapservicestatus2',[raison_refus_rendez-vous]) as [Newraison_refus_rendez-vous];
And this is my expression:
=Count({<Marquenew={'Citroën'}>}{<[Newraison_refus_rendez-vous]={'Rendez-vous déjà fixé','Véhicule vendu','Entretien déjà effectué','Autres'}>} [Newraison_refus_rendez-vous])
Any idea where I am wrong?
Many Thanks,
Hasvine
Hi,
In script try like
if(Isnull(FileName) or len(trim(fieldName))=0,'Others',FieldName)
Regards
Your set expression seems wrong.
Should be,
=Count({<Marquenew={'Citroën'},[Newraison_refus_rendez-vous]={'Rendez-vous déjà fixé','Véhicule vendu','Entretien déjà effectué','Autres'}>} [Newraison_refus_rendez-vous])
hi,
try something like
=Count({<Marquenew={'Citroën'}>}{<[Newraison_refus_rendez-vous]={'Rendez-vous déjà fixé','Véhicule vendu','Entretien déjà effectué','Autres'}>} if( isnull([Newraison_refus_rendez-vous]),'Others',[Newraison_refus_rendez-vous]))
If I understand you correctly, you need this script to map nulls and spaces to 'Autres':
nullclean:
LOAD null(), 'Autres' Autogenerate 1;
LOAD '', 'Autres' Autogenerate 1;
mapservicestatus2:
Mapping LOAD * Resident nullclean;
DROP table nullclean;
AS_XX_XXX:
ApplyMap('mapservicestatus2', [raison_refus_rendez-vous], 'Autres') as [Newraison_refus_rendez-vous];
Now your expression:
=Count({<Marquenew={'Citroën'}, [Newraison_refus_rendez-vous]={'Rendez-vous déjà fixé','Véhicule vendu','Entretien déjà effectué', 'Autres'}>} [Newraison_refus_rendez-vous])
HI,
Try like this, no need of Mapping Load & Applymap(). just use If with Len() & Trim() like below
TableName:
LOAD
*,
If(Len(Trim([raison_refus_rendez-vous])) = 0 , 'Autres', [raison_refus_rendez-vous]) as [Newraison_refus_rendez-vous]
FROM DataSource;
Hope this helps you.
Regards,
Jagan.
Hi All,
Thanks for your quick response.
My graph shows something this:
I tried the tips provided by and then I get the pink bar but it is not link to the 'Autres'.
I usually do the mapping and it works fine when I replace a word by another but the blank cell doesn't work.
The null shows like that in the database:
Thanks,
Hasvine
Hi,
If possible share sample app.
Regards
Are those nulls in your screenshot, or are they text values '{null}'?
Either my script above, or Jagan's script (which is better if all you need to convert is the nulls), will convert the null values into 'Autres' and fix your chart.
Hi Jonathan,
They are null . I tried both ways and the I get the same result as shown in the screen shot. It creates a new bar in pink (the 417 and it marks it as '-')
😞
Thanks,
Hasvine