Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to
select
count(id)
where
field 1 like 'Inventory'
or field 2 = 'Inventory'
I need this in a chart expression. I know that I can
field 1 = {*Inventory*},
field 2 = {'Inventory')}
likewise,
field 1 = {*Inventory*},
field 2 +={'Inventory') or -= or /=
I need to make sure that I count field one is inventory or where filed 2 is inventory.
I am quite new to QlikView and any help would be appreciated.
Hi
Try like this
count({<wr.Short_Description = {'*Inventory*'}> + <wr.Work_Request_Type = {'Inventory'} >} Work_Request_ID)
Hi,
Try like this
=Sum(Aggr( If(wr.Short_Description Like '*Inventory*' or wr.Work_Request_Type ={'Inventory', 1, 0), Work_Request_ID))
Hope this helps you.
Regards,
Jagan.
This is working. It is giving me short descriptions for inventory and say order as well as the ones for work request type as inventory. Interesting that field one union field 2 and then exclude? minus.
What remains is to have this inside an ordinary set analysis. Say,
field 3 = {'Status','Create'} to further restrict the data in the expression. That is to say, where field 3 in status,create.
Syntax is killing me in the set analysis. I have read qlikview 11 for developers. It is the complex sets that are driving me mad. I have worked in Tableau, Cognos, MicroStratedgy, and SSRS. I know that it will just take some time and experience.
Thanks to all for your help
Yes, you missed '<'. try:
count({<wr.Short_Description = {'*Inventory*'}> + <wr.Work_Request_Type = {'Inventory'} >} Work_Request_ID)
This is probably the final answer to my discussion. I will mark srchilukoori as the correct answer. Here is my final expression.
count({<wr.Short_Description ={'*Update Inventory*'},
wrTracking.affectedField={'Status','Create'},
wrTracking.Char_Status -= {'Pending Close','Closed'}
>} Work_Request_ID)
+
count({<wr.Work_Request_Type = {'Inventory'},
wrTracking.affectedField={'Status','Create'},
wrTracking.Char_Status -= {'Pending Close','Closed'}
>}Work_Request_ID)
-2*
count({<wr.Short_Description ={'*Update Inventory*'}, wr.Work_Request_Type = {'Inventory'},
wrTracking.affectedField={'Status','Create'},
wrTracking.Char_Status -= {'Pending Close','Closed'}
>} Work_Request_ID)
srchilukoori. Is the -2* saying exclusion and then intersection? Sometimes, the - and * get mixed up in my head. so, thanks.