Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with expression

Hi everyone,

Can you tell me if the following expression is correct please?

sum(if(wildmatch(Narrative,'STKADJ*'>0 or Narrative,'GRN*')>0,StockValue))

I need it to give me a figure of the StockValue for anything where the Narrative is wildmatched to STKADJ and GRN.

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If I understood correctly:

=sum(if(wildmatch(Narrative,'STKADJ*','GRN*')>0,StockValue))

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Change it to

     sum(if(wildmatch(Narrative,'STKADJ*') or wildMatch( Narrative,'GRN*'),Sum(StockValue)))

Celambarasan

swuehl
MVP
MVP

If I understood correctly:

=sum(if(wildmatch(Narrative,'STKADJ*','GRN*')>0,StockValue))

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thanks for that. It didn't quite work but i changed it to

sum(if(wildmatch(Narrative,'STKADJ*') or wildMatch( Narrative,'GRN*'),StockValue))

Which worked.

Thanks

Hi Stefan,

Thanks that also worked and is easier to understand.

Thanks