Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am trying to create a bar chart displaying the 3 latest months in one chart per product (or in this case the number of flights per aircraft). I am very new to Qlik Sense so any help or advice would be really appreciated!
Dates are loaded as follows:
Link:
LOAD
datetype,
date,
Day(date) as Ops_day,
Month(date) as Ops_month,
Year(date) as Ops_year
Thanks in advance,
Manuel
=SUM({$<Date= {">=$(=AddMonths( MonthStart (Today()),-3))<=$(=MonthEnd(Today())"}>}Sales)
Hi @Manuel06 ,
Take Product as your Dimension and 3 expressions for 3 months,
Expression 1 : =sum(if(yourDateField>=MonthStart(AddMonths(Today(),-2)) and yourDateField<=MonthEnd(AddMonths(Today(),-2)), yourField)) Expression 2 : =sum(if(yourDateField>=MonthStart(AddMonths(Today(),-1)) and yourDateField<=MonthEnd(AddMonths(Today(),-1)), yourField)) Expression 3 : =sum(if(yourDateField>=MonthStart(Today()) and yourDateField>=MonthEnd(Today()), yourField))
Here I am taking 3 months Feb, Mar, Apr. Adjust AddMonths() parameter according to your requirement.
-Shubham