Qlik Community

New to Qlik Sense

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

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik_Bio06
Contributor III
Contributor III

Sum of Sales Current and actual month

Hi,

How can I display the current and last month Sum (CHF)? i don't really understand the syntax. I need a guide for dummies.😅

That should be easy for the experts here.

 

Thanks for the help.

Qlik_Bio06_0-1618412685970.png

 

Labels (1)
1 Solution

Accepted Solutions
Dalton_Ruer
Employee
Employee

Several options you have. 

1. You can create a flag in the Load Script that says "This row is part of the Current Month, Previous Month, Current Year etc. Search for Master Calendar for Qlik and you will find tons of examples. If it's done as a "flag" you could simply use a formula like this in a KPI    "Sum(CurrentMonthFlag * Sales)"  Since the flag would be 1 if the value is in the current month and 0 if it isn't.  If you bring your data in through the wizard you will see in the load script that it actually creates a set of Derived date values for you so you have a working example of the concept. 

2. Alternatively you could use what is called Set Analysis in Qlik to say "Hey only give me the sum of sales for rows where my date is within this range." Check out this post which contains a hands on lab if you start reading about Set Analysis (you will use it all the time) and want to really dig in. 

View solution in original post

1 Reply
Dalton_Ruer
Employee
Employee

Several options you have. 

1. You can create a flag in the Load Script that says "This row is part of the Current Month, Previous Month, Current Year etc. Search for Master Calendar for Qlik and you will find tons of examples. If it's done as a "flag" you could simply use a formula like this in a KPI    "Sum(CurrentMonthFlag * Sales)"  Since the flag would be 1 if the value is in the current month and 0 if it isn't.  If you bring your data in through the wizard you will see in the load script that it actually creates a set of Derived date values for you so you have a working example of the concept. 

2. Alternatively you could use what is called Set Analysis in Qlik to say "Hey only give me the sum of sales for rows where my date is within this range." Check out this post which contains a hands on lab if you start reading about Set Analysis (you will use it all the time) and want to really dig in. 

View solution in original post