Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have requirement that I want to show line chart that should be Current Month, Previous Month ,Current Month Previous Year wise sales
dimension: day
current month:
sum({<type={'Order'},FiscalMonth={$(=month(max(FiscalMonth)))}>} Sales)
it works fine
ex - FiscalMonth :apr
and i have encountered error in previous month
previous month:
sum({<type={'Order'},FiscalMonth={$(=month(max(FiscalMonth)-1))}>} Sales)
Can anybody help ?
Hello Scotly
Please try using addmonths function as below:
addmonth(max(FiscalMonth),-1)
Regards
Chintan
May be use this:
Previous Month
Sum({<type={'Order'}, Date = {"$(='<=' & Date(MonthStart(Max(Date), -1), 'YourDateFieldFormatHere') & '>=' & Date(MonthEnd(Max(Date), -1), 'YourDateFieldFormatHere'))"}>} Sales)
PreviousYear
Sum({<type={'Order'}, Date = {"$(='<=' & Date(AddYears(Max(Date), -1), 'YourDateFieldFormatHere') & '>=' & Date(AddYears(Max(Date), -1), 'YourDateFieldFormatHere'))"}>} Sales)
If this doesn't work, would you be able to provide a sample to look at?
Sunny,
I hope all is well with QlikView..
I have one Excel, In that.. In that i have fields like -- Date, Sales, Product..
So, once i apply to Bar graph. I want to achieve in bar chart show current month, previous month, last year current month.
Ex:- Let's Say, if i select May - 2016 on dimension i want in bar chart like -- May - 2016 and April - 2016 and May - 2015
Note: Please find O/P like attached Image for Reference..!
Thanks,
Anil.
Hello Scotly
Are you able to resolve your issue? You may post the expression you used, it will be useful for others facing similar issue.
Thanks & Regards
Chintan
Hi Chinatan,
Issue got resolved.
Thank you
try this
sum({<type={'Order'},FiscalMonth={$(=month(max(FiscalMonth)-1))},month=,year=>} Sales)
Can you please post that. If possible, Please stick the Correct answer whoever gave the right way on your wall tab. Current Month -- Expression ? Last Month -- Expression ? Last Year Current Month -- Expression ?