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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average field in the script - Campo promedio en el script

hi everyone, i am using qliksense, i have a table with exchanges rates per day, i need calculated a average the rates per month, the table is.

daily_ER:

load

exchnage_rates

currency_code

currency

exch_date // this field have the information day per day, i need a fiel with the average per month.

from.......xxxxxxxxx

----------------------

hola a todos tengo una tabla con tipos de cambio por dia, necesito calcular un promedio de tipos de cambio por mes, la tabla es

diario_tc

load

tipos_de_cambio

codigo_moneda

moneda

fecha_de_tc // este camo tiene la informacion dia por dia, yo necesito un campo que tenga promedio por mes

from...... xxxxxxxx

thanks

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

daily_ER:

LOAD exchnage_rates,

     currency_code,

     currency,

     exch_date,

     MonthName(exch_date) as MonthYear

from.......xxxxxxxxx

Left Join(daily_ER)

LOAD MonthYear,

          currency_code,

          currency,

          Avg(exchnage_rates) as Monthly_AverageRate

Resident daily_ER

Group By MonthYear, currency_code, currency;


View solution in original post

2 Replies
sunny_talwar

May be like this:

daily_ER:

LOAD exchnage_rates,

     currency_code,

     currency,

     exch_date,

     MonthName(exch_date) as MonthYear

from.......xxxxxxxxx

Left Join(daily_ER)

LOAD MonthYear,

          currency_code,

          currency,

          Avg(exchnage_rates) as Monthly_AverageRate

Resident daily_ER

Group By MonthYear, currency_code, currency;


Not applicable
Author

thank you, so much, i really appreciate your help!