Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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

 

16 Replies
coerdn
Partner - Contributor II
Partner - Contributor II
Author

many thanks. but what did you calculate in monthnum? can you send me the xls?

arulsettu
Master III
Master III

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

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Can I suggest you create Master Calendar first if you don't already have one.

However, quick solution I will suggest from your data is to create 2 variables

LET vMaxDate               = '=DATE(MAX([Sales Date]))';
LET vPrevMonthDate = '$(vMaxDate)-1';

 

Then your KPIs

Current Month = SUM({<[Sales Date]={'$(vMaxDate)'}>} Sales)

Prev Month        = SUM({<[Sales Date]={'=DATE($(vPrevMonthDate))'}>} Sales)

 

Hope this helps

coerdn
Partner - Contributor II
Partner - Contributor II
Author

How can i create a master calender

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

 

You've marked your initial question as answered, so to create calendar you need to search the community here. 

coerdn
Partner - Contributor II
Partner - Contributor II
Author

But in the Expression of the Measure for the prev. Month you do not use this Monthnum. So is it necessary?

arulsettu
Master III
Master III

No