Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
danilopvh
New Contributor II

How to convert condition to set analysis

Hi, I need to convert this formula into set analysis ... any help?

COUNT(IF(WildMatch(PRODUTO,'MADEIRA*') AND UF_ORIGEM<>UF_DESTINO, SEQ_ITEM_GUIA))

Thanks

Note. I'm Brazilian, my writing is not good. But my reading is very good.

1 Solution

Accepted Solutions
Luminary
Luminary

Re: How to convert condition to set analysis

How about this:

Count({<PRODUTO={"MADEIRA*"}, UF_ORIGEM-={'UF_ORIGEM'}>}SEQ_ITEM_GUIA)

View solution in original post

9 Replies
vamsee
Valued Contributor

Re: How to convert condition to set analysis

Hello,

Try this

COUNT({<Poruduto={'MADEIRA*'}, UF_ORIGEM-={'UF_DESTINO'}>}SEQ_ITEM_GUIA)

Thanks

vamsee
Valued Contributor

Re: How to convert condition to set analysis

This is a very good document for Set Analysis.

Please have a look

Set Analysis: syntaxes, examples

Luminary
Luminary

Re: How to convert condition to set analysis

How about this:

Count({<PRODUTO={"MADEIRA*"}, UF_ORIGEM-={'UF_ORIGEM'}>}SEQ_ITEM_GUIA)

View solution in original post

Luminary
Luminary

Re: How to convert condition to set analysis

Hi, the search string should be in double quotes otherwise it will not work in new Qlik Sense versions. Check this out: Quotes in Set Analysis

vamsee
Valued Contributor

Re: How to convert condition to set analysis

Thanks for that

Partner
Partner

Re: How to convert condition to set analysis

You can add a flag in the script.  For example:

LOAD

...

WildMatch(PRODUTO,'MADEIRA*') as Flag

Resident YourTableName;

Then for the set analysis you can use:

COUNT( {< Flag = {'1'}, UF_ORIGEM -= {'UF_DESTINO'} >} SEQ_ITEM_GUIA )


Hope this helps.

danilopvh
New Contributor II

Re: How to convert condition to set analysis

It worked, thank you very much

Highlighted
danilopvh
New Contributor II

Re: How to convert condition to set analysis

It works too, thanks.

vkish16161
Contributor III

Re: How to convert condition to set analysis

Count({<PRODUTO={"MADEIRA*"}, UF_ORIGEM  =-    {'UF_ORIGEM'}>}SEQ_ITEM_GUIA)