Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a string column Location like A\B\C\..
using subfield i can split every part with delimeter \
but this formula not working
=count( {< subfield(Location ,'/',2)={'B'}>} Item )
or
=count( {< subfield(Location ,'/',2)={'B'}>} subfield(Location ,'/',2) )
thanks in advance
try this
Sum({<Location={"=SubField(ActionCode,'/',2)" }>} Sales)
I need to count/sum of all location which equal to string B for example
this work
=count( {< location={'A\B\C'}>} Item )
but
=count( {< subfield(Location ,'/',2)={'B'}>} Item )
has error
did you tried this?
count({<Location={'B'},Location={"=SubField(ActionCode,'/',2)" }>} Item)
or
=count( {<Location={'B'} >} SubField(Location,'/',2)Item)
why don't you create flag in backend i.e. in script
and using that flag sum or count those location in front end
Try like
Load text,if(SubField(text,'/',2)='B',1,0) as Location_B_Flag Inline[
text
A/B/C/
A/C
D/B
S/B/D
];
and in front end below expression is enough
=Count({<Location_B_Flag={'1'}>}text)
Regards,
Thanks for your answer but didnt work😔
honestly i am new to Qlik and dont know how and where to put this code
Data is loading from SQL ODBC connection.
did you mean in the edit script section before load from SQL?
did you mean in the edit script section before load from SQL?
Yes, there you can create flag