Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sindisa12
Contributor
Contributor

Not Wildmatch function

Good day.The first part of the expression below does not work when using "not wildmatch" function.  I have under Region ABC, Region A, Region B and Region C. Other Regions include D, E, F, G,H,I.

The first "if" statement should calculate the amount * Month3% if Region is D, E,F,G,H,I. The second "if" statement should calculate amount only if Region = A,B or C. This expression calculates correctly but the first one with "not wildmatch" function does not bring the correct results. what other function should i use instead?

if(match(Description,'New') and Line_ID <>20 and not wildmatch(Region, 'ABC*'),
Sum({<Line_ID_2 = {3} >} Amount * only(Month3%),

if(match(Description,'New') and match(Line_ID ,20 ) and wildMatch (Region, 'ABC*'),
sum( Amount),

 

Labels (1)
11 Replies
sunny_talwar

Not sure if you condition is right or not, but try this for the true condition

Sum({<Line_ID_2 = {3}>} Amount * Month3%)
sindisa12
Contributor
Contributor
Author

Hi Sunny, I tried the solution and still does not work.
sindisa12
Contributor
Contributor
Author

Hi Sunny, I tried using your solution and still does not work.
sunny_talwar

Do you know what isn't working? the condition or the expression?

sindisa12
Contributor
Contributor
Author

The expression as it is not bringing the desirable results.

sunny_talwar

Oh so it is bringing a result, just not the one you wanted.... can you provide some information on what you are getting and what you hoped to get?

shamiul_islam
Contributor III
Contributor III

You can use Resident to calculate the sum where you can use 'NOT EXISTS' function.
sindisa12
Contributor
Contributor
Author

The value is 800 for Region A, B or C and it should be zero for others. I am trying to avoid adding the parameter  Line_ID  and multiplying by the month% for this calculation. The first expression is applied even if the Region does not fall under the category.

sindisa12
Contributor
Contributor
Author

Good day. This is done in the front end expression at the moment as parameters come from different tables.