Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
varma8998
Contributor III
Contributor III

How to do wildmatch in set analysis

Hi All,

I am planning to do wild match in set analysis for example

In column A

           12345,

          5678,

          3452, and so on

but out of that I want to do unfiltered two or three

 

 

 

1 Solution

Accepted Solutions
rubenmarin

You can use -= to remove values from selection. Following with previous example it could be:

Sum({<FilteredField-={"Val*","*string*"}>} Value)

In this case the -= will do the opposite than:

Sum({<FilteredField={"Val*","*string*"}>} Value)

View solution in original post

8 Replies
rubenmarin

Hi, I don't understand your requirements.

If it helps you can filter by different values using commas:

Sum({<FilteredField={'Value1','Value2'}>} Value)

Or using * with double quotes:

Sum({<FilteredField={"Val*","*string*"}>} Value)

varma8998
Contributor III
Contributor III
Author

Thanks for quick reply,

table format will be

Column A  Column B  Column C

AAAA         12345        XXXX

BBBB       **bleep**45        XXXXX

CCCC     67&56          XXXXX

DDDD    467AB          XXXX

EEEE     >1&<1        XXXX

FFFF     ABC56       XXXXX

GGGG   5678         XXXXX

HHHH   7891         XXXXX

and so on....

If you observe in Column B values are mixed with numbers and alphabets. I don't want few values in column B by using set analysis how can we do that  

rubenmarin

You can use -= to remove values from selection. Following with previous example it could be:

Sum({<FilteredField-={"Val*","*string*"}>} Value)

In this case the -= will do the opposite than:

Sum({<FilteredField={"Val*","*string*"}>} Value)

varma8998
Contributor III
Contributor III
Author

Hi

Thanks for quick reply it Is working fine now

I have one more Question Please help me with that

Same like the above table

Column A

Dec

Feb

Mar

Jun

Dec

Dec

here I want to max of Month in set analysis

rubenmarin

You can do calculated filters like this:

Sum({<Month={$(=Max(Month))}>} Value)

With months can be issues if the format is nor a number, in that case can be better using set analysis with a fxed numeric month:

In script: Num(Month(Date)) as MonthNum

In set analysis: Sum({<MonthNum={$(=Max(MonthNum))}>} Value)

Also note that with different years availables max month will always be December, to filter the last month between diffrent years you will need a field with year and month in the same field like:

Script: Year & Num(Month(Date), '00') as Period

Set analysis: Sum({<Period={$(=Max(Period))}>} Value)

varma8998
Contributor III
Contributor III
Author

Hi

I also did that in same way but still I am not getting the value

Table Format

HPA Month   Series   Value

December     123      4578

December     456      6735

November     789      8567

November     657      7894

November     876     6504

October         345      7867

Sum({<[HPA Month]={'$(=MaxString([HPA Month]))'}>} Value)

I took the same code but I am not getting the value instead of December value I am getting the October value

Please help me with how to get the December value

 

rubenmarin

Hi, that's not the same way, you ar using maxstring() not max().

As I said you need to use the numeric format of month and use Max(). Maxstring() will return the higher but sorted alphabetically.

Review my previous post and ask me if you don't understand something.

tresesco
MVP
MVP

So it's a duplicate thread of https://community.qlik.com/t5/New-to-Qlik-Sense/How-to-get-the-max-Month-in-Set-analysis/m-p/1693908...

 

Please close both once resolved.