Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

Problems showing Prev month sales.


I'm new in Qlik sense.

I need to show this


2018-01Previus MonthForecast



Seller 1334045
Seller 2433540

I use Sql server Via Oledb, I have Date, Year, Month and cuantity fields in my query.

I try defining variables on the script section and use a measure

The variables have allredy been Checked.

Sum({<Year={"$(=Max(Year))"}, YearMonth={"<=$(=vPriorMonthYear)"}, Year=,Month=>}Cuantity)

On a pivot Table. But I always recieve the same values on "2018-01" and Previus Month columns.

1 Reply

Re: Problems showing Prev month sales.

Why are you using <= vPriorMonthYear, do you need all years summed together or just the last month? Also, for 201801, the last Month will be in Year 2017. You might want to consider removing the set analysis from Year field because that is contradicting your YearMonth's set analysis.

Community Browser