Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Selecting the 2 last months

Hey guys,

i trying to build a function which should select the last two months. With this function i am able to select the last month...

= Month(max({1}[Tatsächliche Einfahrt Datum]))

I want to activate this function when i switch to the next dokument...

Thank you

1 Solution

Accepted Solutions

Re: Selecting the 2 last months

May be this:

='(' & Month(max({1}[Tatsächliche Einfahrt Datum])) & '|' & Month(AddMonths(Max({1}[Tatsächliche Einfahrt Datum]), -1)) & ')'

5 Replies

Re: Selecting the 2 last months

May be this:

='(' & Month(max({1}[Tatsächliche Einfahrt Datum])) & '|' & Month(AddMonths(Max({1}[Tatsächliche Einfahrt Datum]), -1)) & ')'

Re: Selecting the 2 last months

=SUM({<InvoiceMonth=, InvoiceYear=, InvoiceQuarter=, InvoiceWeek=, InvoiceDate = {">=$(=MonthStart(Max({1}InvoiceDate),-1))<=$(=MonthEnd(Max({1}InvoiceDate)))"}>}Sales)

1) This will give you Total Sales for last two months.

2) I have bypassed InvoiceMonth,Year,Quarter, Week. So any selection made in those list box will not affect the end result.

Change InvoiceDate with [Tatsächliche Einfahrt Datum] and Sales with your respective fact data.

Re: Selecting the 2 last months

I thought he wanted Select in Field action expression . My bad

Re: Selecting the 2 last months

Actually I also not understood what the question is... But just trying !

Re: Selecting the 2 last months

Hahahaha I guess between the two of us, we have got the base covered

Best,

Sunny

Community Browser