Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
OmarBenSalem

Working with 2 periods in QlikSense

Hi all,

I want to work with 2 periods in Qlik Sense but I can't figure out a way to do it;

here's what I've done with QlikView:

I have 4 variables for my 2 periods (vDateFrom1, vDateTo1, vDateFrom2, vDateFrom2)

Capture.PNG

example of the expression:

Sum({<[Calendar date]={'>=$(=Date($(vDateFrom1)))<=$(=Date($(vDateTo1)))'}>}Montant_Vente)

Now, I want to do the same thing in QlikSense; How can I ?

I've tried to use 2 extensions I've found,

DateRangePicker and input variables:

with the input variables, I found out that it only can be text or number format !

With the Date Range Picker here's what I did:

Capture.PNG

I've chosen periode 1: last 7 days / periode 2 : last 30 days

the result is right, but what's appearing in the periods is so wrong (01/04/2016- 04/04/2016 !!

Is there another way to handle this??

5 Replies
reddy-s
Master II
Master II

Hi Omar,

Are  you making use of 4 date pickers? If so is it possible to share the expressions of the two KPI's you are using
?

Thanks,

Sangram.

OmarBenSalem
Author

4 date pickers? No ! In fact, I found an extension with that name (date picker); but when I try to use it don't work; there is an error message saying that the visualisation doesn't exists in the sense server.

In my case I'm using 2 date range picker extensions:

Capture.PNG

the dimension of the periode 1 data range picker extension: calendar date : the date of my master calendar

the dimension of the periode 2 data range picker extension: Date_Ticket: the date of my fact table

Sum periode 1: Sum({<[Date_Ticket]=>}Montant_Vente)

Sum periode 2: Sum({<[Calendar date]=>}Montant_Vente)

the result is accurate since I've chosen the last 7 days for periode 1 and last 30 days for periode 2 BUT, when you take a look at the dates appearing in the 2 range calendars, you'll see that  it appears that I've selected from 01/04/2016 to 04/04/2016 for both periods !!

I'm really confused ! Plus, I couldn't use any other calendar extension ! It always shows me the error message or appears as a blank when I drag and drop it ! the page remains blank !

OmarBenSalem
Author

Hi Sangram,

I'm really in need of a date picker object.

I found out that there might be an extension , the qWidget, that can be of a use in my case.

I found out that if we're a partner, we can have access to download it.

I am, but I can't; there is a restriction. Can you please help me with that? It's an urgency.

Thank you !

reddy-s
Master II
Master II

Hi Omar,

Post a request here: https://www.qlikcommunity.org/thread/158945?start=210&tstart=0

Ann-Louise Andersson will give you access.


Also drop in your email.


Thanks,

Sangram.

rbecher
MVP
MVP

..you need to import the daterangepicker extension as zip to the server via QMC.

- Ralf

Astrato.io Head of R&D