# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for
Did you mean:
Creator II

Hi Guys

I have this expression to the value of my MAX DATE FIELD.

=sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'},DATA_BASE_FINAL={"\$(=(MAX(DATA_BASE_FINAL)))"} >} EAD_ATUAL)/1000000

How Can I write another expression returning the previous month of MAX DATE?

I'm trying using Addmonths but not sucess. You guys think another way to solve that?

Tks a lot!

1 Solution

Accepted Solutions
Partner

Try:

Above(

sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'} >} EAD_ATUAL)/1000000

)

per analogy:

11 Replies
Partner

Creator II
Author

Hi Omar,

Is not working.

=sum({<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'},DATA_BASE_FINAL={"\$(=addmonths(MAX(DATA_BASE_FINAL),-1))"}>}EAD_ATUAL)/1000000

Display 0

Partner

What's ur aim? What do u want to do?

Creator II
Author

I have a Bar Chat.

My first bar is with the expression =sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'} >} EAD_ATUAL)/1000000

It works returning the values of each month.

I want to plot another bar with the previous month value

For example

First bar

Date = 201812 = 500k

Date = 201811 = 400k

My second bar should return the previous month value.

Date = 201812 = 400k (value for 201811).

Partner

Try:

Above(

sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'} >} EAD_ATUAL)/1000000

)

per analogy:

Creator II
Author

Hei Omar it worked.

One question, Can I insert one line with the variance of month - previous month?

Partner

Use the "combined chart"

(

sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'} >} EAD_ATUAL)/1000000

-

Above(

sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'} >} EAD_ATUAL)/1000000

)

)

/

Above(

sum({\$<STAGE_IFRS9_FINAL_X={'Stage 1'},Carteira_IFRS_ATUAL={'EMPRESAS_1','EMPRESAS_2','EMPRESAS_3'},MOTIVO=-{'Fora Escopo Anterior','Saiu do Escopo','Se mantém fora do Escopo','Fora Escopo Atual'} >} EAD_ATUAL)/1000000

)

put it as a line (second axis) :

Result:

Creator II
Author

Hi I did, but look how it plotted.

Partner

Under the x-axis, uncheck continous axis.

Tags
Community Browser