Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

Help with expression

Hi All,

I am having data like below,

 

Keynamemonthyearfee
11-aa13120183850
11-aa22820180
11-bb13120180
11-bb22820180
11-cc13120180
11-cc2282018

0

where my requirement is i need only those key and name where fee has been changed over month.

expected output is,

11-aa22820180

Please help with the expression.

9 Replies
olivierrobin
Specialist III
Specialist III

hello

you can use an expression like

date(monthyear,'DMMYYYY')>Reference Date (you may need to use date() function arond you reference date)

vijetas42
Specialist
Specialist
Author

i don't want to calculate reference date.

olivierrobin
Specialist III
Specialist III

is you reference date the beginning of the month ?

tresesco
MVP
MVP

May be like:

where fee<>Peek(fee);   // to avoid the first row you might use 'and recno()>1' as additional clause

vijetas42
Specialist
Specialist
Author

for now i have added expression to fee like,

IF(fee<> Above(TOTAL fee),sum(fee)) so it's showing whole table with value for changed key but, also showing other key with null values.

it's giving output like,

Keynamemonthyearfee
11-aa1312018-
11-aa22820180
11-bb1312018-
11-bb2282018-
11-cc1312018-
11-cc2282018

-

but i want only second row where value is there

tresesco
MVP
MVP

PFA

vijetas42
Specialist
Specialist
Author

Thanks Tresesco!

It worked but i have one doubt that in rangemax(sum(fee),0.0000001) what does 0.0000001 indicates? because when I used only 0 it's not working.

tresesco
MVP
MVP

That's to avoid 'zero suppression'. You have to be sure if you could afford to have small fraction in the chart calculation.

vijetas42
Specialist
Specialist
Author

Thanks for all your help