Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
danilopvh
Contributor II
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
Ivan_Bozov
Luminary
Luminary

How about this:

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

vizmind.eu

View solution in original post

9 Replies
vamsee
Specialist
Specialist

Hello,

Try this

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

Thanks

vamsee
Specialist
Specialist

This is a very good document for Set Analysis.

Please have a look

Set Analysis: syntaxes, examples

Ivan_Bozov
Luminary
Luminary

How about this:

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

vizmind.eu
Ivan_Bozov
Luminary
Luminary

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

vizmind.eu
vamsee
Specialist
Specialist

Thanks for that

agigliotti
Partner
Partner

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
Contributor II
Contributor II
Author

It worked, thank you very much

danilopvh
Contributor II
Contributor II
Author

It works too, thanks.

vkish16161
Creator III
Creator III

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