Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to get the Match function to work, since I think it is a good way to solve my problem (if not, let me know!) I have a excelsheet like the one attached and tried with the expression as follows:
=if(Match(NBR, Nbr)>0,sum(Sales),0)
My desired answer is the sum of sales for customer ABDF with matching number i.e 206, how can I get this to work?
Thanks in advance.
/Lina
dimension Customer
expression sum(if(NBR=Nbr,Sales))
DIRECTORY;
LOAD Customer,
Nbr
FROM
TestMatch.xlsx
(ooxml, embedded labels, table is Sheet1);
LOAD Customer,
NBR,
Sales
FROM
TestMatch.xlsx
(ooxml, embedded labels, table is Sheet2)
=if(Match(NBR, 'Nbr')>0,sum(Sales),0)
Simply Add ' char
Something Like Below....
=if(Match([Customer Name],'ABC','DEF'), SUM(Sales))
=if(WildMatch([Customer Name],'*B*','*E*'), SUM(Sales))
Thanks Alessandro, I got this to work if I write e.g 'YYY999', but not for the whole Nbr column. Maybe there is anothe function more suitable. The problem I want to solve is to know if the NBR coumn contains numbers that also is present in the Nbr column, and if there is a match I want to summarize the sales data for the one thet matches. Understandable?
Use WildMatch, look in the help section in Qlik
Then you can do something like:
Sum(if(wildmatch...), myVal, 0)
This will return the sum of elements that match
dimension Customer
expression sum(if(NBR=Nbr,Sales))
DIRECTORY;
LOAD Customer,
Nbr
FROM
TestMatch.xlsx
(ooxml, embedded labels, table is Sheet1);
LOAD Customer,
NBR,
Sales
FROM
TestMatch.xlsx
(ooxml, embedded labels, table is Sheet2)
=If(Match(NBR, 'Nbr')>0 or isNUM(NBR), SUM(Sales),0)