Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
coerdn
Partner - Contributor II
Partner - Contributor II

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
arulsettu
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
arulsettu
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)

 

coerdn
Partner - Contributor II
Partner - Contributor II
Author

Where do i have to calculate that?

"Month(Date) as Month"

 

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

arulsettu
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

coerdn
Partner - Contributor II
Partner - Contributor II
Author

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

 

arulsettu
Master III
Master III

Can you share sample app with expected output

coerdn
Partner - Contributor II
Partner - Contributor II
Author

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

arulsettu
Master III
Master III

Can you also share the excel used in the qvf

coerdn
Partner - Contributor II
Partner - Contributor II
Author

 
arulsettu
Master III
Master III

Check this