Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Sales of current and prev. Month

Hi together,

i want to display to KPI's.

First is sales of current month and second is Sales of previous month. Everything should work dynamic linked to the selected month in the filter pane. 

I already tried this: https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Measures/create-calendar...

Do i have to do something in advance?

 

Many thanks

 

1 Solution

Accepted Solutions
Highlighted
Master III
Master III

It just converting Month to numbers within qlik. Please mark the correct answer to the reply

View solution in original post

16 Replies
Highlighted
Master III
Master III

All you need is a date field and you can create month using the date field like below

 

Month(Date) as Month

 

then use the Month in set analysis for current month like below

sum({<Month={'$(=Max(Month))'}>}sales)

 

Highlighted
Partner
Partner

Where do i have to calculate that?

"Month(Date) as Month"

 

And how do i get the prev. month? Month -1?

Highlighted
Master III
Master III

In your load script crate the month field

 

and previous month in a chart expression like this

Sum({<Month={'$(=max(month)-1)'}>}sales)

 

Share some sample data to replicate this

Highlighted
Partner
Partner

Now i tried your reply, but did not work. First step creation of Month and then visualize with formula. Whats wrong?

coerdn_0-1594728031264.png

coerdn_1-1594728361201.png

 

Highlighted
Master III
Master III

Can you share sample app with expected output

Highlighted
Partner
Partner

Here is the app would be great if you could help me

Highlighted
Master III
Master III

Can you also share the excel used in the qvf

Highlighted
Partner
Partner

 
Highlighted
Master III
Master III

Check this