Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variance / Tolerance Expressions - Flagging

I am trying to develop an expression that will look at the percentage of the difference between current month and previous month charges and compare to a table, then the result should be identified in a way that if the difference in the charge is 10% (or 5% or 20%) from one month to the next it will flag that charge id.

Any ideas?

Here is an example.

This is my tolerance table:  Tolerance Table.PNG

This is my chart - Tolerance Variances.PNG

The "DIFF in %" on my chart is -10% ....  How do I "FLAG" that??

Thanks in advance for your help!

1 Solution

Accepted Solutions
Not applicable

Looks like you have one set of ranges per ChargeIDNum. In this case, you don't need IntervalMatch. All you need to do is join the table with the ranges to the original table. This will give you one record with everything you need. Then all you need to do is write the code to test the condition and highlight the appropriate field.

View solution in original post

5 Replies
Not applicable

Dawn,

If you might have multiple ranges for each ChargeID then you could use IntervalMatch to compare the percent difference to the range you're interested in. If you only ever have one range (record) for each ChargeID then you could just join the tables and do a straight compare. I assume you'd assign the flag to the result field (maybe set it to a 1 if the flag is set).

Once you have the result, if you'd like a visual indicator based upon the flag, you can add an expression to the color propery of the column to change the background. E.G..... Expand the plus sign next to the field, click "background color", click the Edit button, then enter into the Definition Box something like...

     if(RESULT = 1, RGB(234,21,21))

That would change the background to red.

Hope this helps.

Not applicable

So, if you'd like the ChargeID to turn red, the do that to the dimension for ChargeID. If you want the Current vs. Previous Month to turn red then do it for that expression (field). etc....

Not applicable

Looks like you have one set of ranges per ChargeIDNum. In this case, you don't need IntervalMatch. All you need to do is join the table with the ranges to the original table. This will give you one record with everything you need. Then all you need to do is write the code to test the condition and highlight the appropriate field.

View solution in original post

Not applicable

Thanks so much - that's what I needed!

Not applicable

Thanks so much - that's what I needed!