Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formula Help

Hi Everyone;

I created a line chart that includes average currency value based on years.

I am working with  a lot of  charts and tables. Therefore; I am facing with problems on the process of creating new formulas.

Most of them is based on "Date Field". So When I choosed any date from listbox, My currency line chart only gives data of specific date that I choosed. But I want to show currency trend while I want to show specific datas in other charts and tables.

Forexample; Please assume that, there are two objects, comperatively one of them is "Line Chart" that shows trend and another is "Table" only show specific data of selected date.

When I choosed from data list box anydate to see specific data of selected date, my another object (line chart) which I don't want it to be effected, is broken and shows only selected data.

I tried to fix formula by adding "1" at the begining the formula but I couldn't achieve. Also, from properties pop menus, I detached the object but when I open the file later I see object as a not detach.

My formula as follows ;

=if(Tarih <> GetFieldSelections(Tarih) or Ay<>GetFieldSelections(Ay) or Yil <> GetFieldSelections(Yil),AVG(KURGENEL_MRKSATIS),0).

Dimension of this formula is Year Field. Thus, I want to show trend currency based years.

In sum; I don't want this formula to be effected from any selection. How Can I success this ?

Thanks in advance,

Best Regards,

Mustafa Özyeşil

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Oh - hang on! I've just looke properly at the rest of your expression and it seems to be an attempt to achieve this! Remove all the IF statements too, to leave

=AVG({<DateField=>}KURGENEL_MRKSATIS)

or

=AVG({1}KURGENEL_

Jason

View solution in original post

3 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

You need to remove the DateField selection from the average part of the expression:

=if(Tarih <> GetFieldSelections(Tarih) or Ay<>GetFieldSelections(Ay) or Yil <> GetFieldSelections(Yil),AVG({<DateField=>}KURGENEL_MRKSATIS),0).

Or you could exclude all other selections:

=if(Tarih <> GetFieldSelections(Tarih) or Ay<>GetFieldSelections(Ay) or Yil <> GetFieldSelections(Yil),AVG({1}KURGENEL_MRKSATIS),0).

Hope this helps,

Jason

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Oh - hang on! I've just looke properly at the rest of your expression and it seems to be an attempt to achieve this! Remove all the IF statements too, to leave

=AVG({<DateField=>}KURGENEL_MRKSATIS)

or

=AVG({1}KURGENEL_

Jason

Not applicable
Author

Hi Dear Jason;

Thanks for your interest and help.

Best Regards

Mustafa