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: 
QSense
Creator II
Creator II

Chart,dimension

Hi,

I have a problem. In chart graph,there is year dimension like 2009,2010.

For each year, I want to write avg the expresion value beyond the year dimension

how Can ı accomplish?

Best regards.

21 Replies
QSense
Creator II
Creator II
Author

graf.png

In the abve you can see result

As you see paranthesis is seen but value is not,

I add formula ina text objectş it gets value (in blue area)

Not applicable

Hi,

May be it is not able to calculate sum properly, Please check your expression.

Also, attached here is a sample app for you to see how it works.

If you still face issue then attach you app.

..

Ashutosh

QSense
Creator II
Creator II
Author

Hi ,

It's size is big nearly 2 gb I can not attach

QSense
Creator II
Creator II
Author

Dimension  :

=Year(CalendarDate)&' ('&Aggr(Sum(CPN_BRD_PAX_KM)/Sum(AVA_SEAT_KM),Year(CalendarDate))&')'

Expression :

Sum(CPN_BRD_PAX_KM)/Sum(AVA_SEAT_KM)

QSense
Creator II
Creator II
Author

Hi again,

My year field is CalendarDate

When I use it without year İn the formula ,It works but

CalendarDate format is dd.mm.yyyy So it works for each day but only ı want yearly avg

Not applicable

Okay not an issue, you can pick correct year.

Use

=Year(date#(CalendarDate,'DD.MM.YYYY'))&' ('&Aggr(Sum(CPN_BRD_PAX_KM)/Sum(AVA_SEAT_KM),Year(date#(CalendarDate,'DD.MM.YYYY')))&')'

Just try it and let me know. It should work!! 

..

Ashutosh

QSense
Creator II
Creator II
Author

Hi Ashutosh 

Unfortunately it didnt work

Not applicable

Hi,

Can you please put below expression into text object and select a date, Do you get year value??

Year( date#( CalendarDate,'DD.MM.YYYY' ) )

..

Ashutosh

Not applicable

Also, I see that in chart you are getting year value, how you are getting year there?

You can use the same field or formula and on basis of that can do aggregation.

QSense
Creator II
Creator II
Author

Year( date#( CalendarDate,'DD.MM.YYYY' ) ) when ı put in into text object it gives error