Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need help

hi, how can i write this in chart expression?

SELECT (amQty) FROM FCTRAN WHERE substri(FCTRANSIT,1,1)='S' and substri(FCTRANSIT,1,1)='M'

13 Replies
vikasmahajan

better while loading  make flag S & M

and use in set analysis like following

sum( {$< Fiscal Year={$(=max(FiscalYear))}, flag={'S'}  amQty )

Hope this helps you.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

hi vikas,

it s not clear. pls explain. thanks

vikasmahajan

Dear Dushan,

In sql script only while taking data from sql  create flag S or M

load this in qlikview

apply set anlysis sum( {$< flag={'S'}  amQty )

This way you can achieve the same.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=Sum({<FCTRANSIT={'S*', 'M*'}>}amQty)

Regards,

Jagan.

Not applicable
Author

thanks jagan. it s working. but my full query is like this. Can i do that?

=Sum({<site={'S*', 'M*','SAM*','SML*','MBO*'}>}amQty)

and also i want to get this data in MONTH='11'

help pls

Not applicable
Author

Hi Dushan ,

Sum ( {<Mid(FCTRANSIT,1,1) ={'S' , 'M'}>} amQty)

It works ..

Regards,

Koti reddy

manideep78
Partner - Specialist
Partner - Specialist

Include Month in same expression

=Sum({<site={'S*', 'M*','SAM*','SML*','MBO*'}, Month={11}>}amQty)

Not applicable
Author

Hi Manideep, I applied it but got the same answer without month filtering. why is that?

Not applicable
Author

=Sum({<site={'S*', 'M*','SAM*','SML*','MBO*'}>}amQty)

=Sum({<site={'S*', 'M*'}>}amQty)  Returns same  Values

Becoz S* results SAM* ,SML*   also 

for Second Check Whether There Is A relation between

  .. Check out Whether there is a Site and Month ..

If there is relation then it will not Return Same for =Sum({<site={'S*', 'M*','SAM*','SML*','MBO*'}, Month={11}>}amQty)


and above..


If there is no relation it will return same..