Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculate select field

Hi to all!!

I changed my qvw to do my pivot tables acumulatives, but I lost one filtering criteria that it was useful for me. So I thought I could calculate it in multi box. I wrote:

=

IF(SUM({$<MONTH={'<=$(=MONTH)'}, DIARIO={'BSS'} >} IMP_DIARIO)>0,'SD','SH')

I know that it works correctl, but when I accept it its name is painted in grey and I can´t select any value (SD or SH) to filtering my data.

What´s wrong in my approach?

Thanks for your answers

Fiber9906





2 Replies
Miguel_Angel_Baeyens

Hello,

You may need to use Aggr() function in this calculation to display values properly,

=IF(Aggr(SUM({$<MONTH={'<=$(=MONTH)'}, DIARIO={'BSS'} >} IMP_DIARIO), FieldName)>0,'SD','SH')


FieldName is the name of the dimension used to get those "SD" and "SH" values.

Hope this helps

Not applicable
Author

Hi Miguel A.!! Nice to meet you again!!

Your solution is almost ok, but something is going wrong. I explain what I´m looking for. My objetive is to detect mistakes in accounting like import positive when it must be negative and viceversa.

In that way, I´ve got a field that tells me if one account must be positive or negative in theory. And the field you are helping me to define is what plus/minus sign actually has.

On my start position I can select SD or SH values, but when I do some selection and I want to get back to start other selection or I don´t have two values or filtering criteria doesn´t work properly.

Actually, my expresion is:

=

IF(AGGR(SUM({$<MONTH={'<=$(=MONTH)'}, DIARIO={'BSS'} >} IMP_DIARIO), SOCIEDAD&'-'&CTA)>0,'SD','SH'))

It´s my first time using aggr formula. Is somthing worng?

Thanks in advance

Fiber9906