Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
danimarc12
Partner - Creator
Partner - Creator

Calendar setting

Hi everyone!

I have an issue with my App. I want to display the revenue of a brand in a specific period selected by the date picker object.

I have selected the period from 1st of January to 22th of January and I display my values (Revenue, Revenue PY, Revenue in same period of PY, etc.).

Immagine.png

 

When I select the brand OFF my Calendar changes:Immagine2.png

With this change my value Revenue in the same period of the previous year chages to and I lose the revenue from the 1st of january to the 4th of january.

This is the expression I use to calculate this measure:

sum({<Data={">=$(=Date(AddYears(Min(Data),-1)))<=$(=Date(AddYears(Max(Data),-1)))"},Anno=>} netto)

where:

  • Data = date field of my master calendar;
  • Anno = year(data), generated by the master calendar;
  • netto = revenue field.

I hope I've been clear.

How can I solve this issue to reach my goal?

Thanks to those who will answer me!

Labels (1)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

"In this way I cannot display the revenue from the 1st Jan to the 3th Jan of the previous year, so I cannot compare the revenue of this year with the revenue of the previous year "

Previous period comparison is possible by way of set analysis,  it doesn't matter if you do not have data for all the dates of a comparing period

as I mentioned earlier the selections from 1Jan2023-22Jan2023 are in Selected Excluded state, so you can still use them as below

Selected Period

sum({<DT={">=$(=Date(Min({1<DT=$::DT>}DT)))<=$(=Date(Max({1<DT=$::DT>}DT)))"}>}Sale)

Previous Year Period

sum({<DT={">=$(=AddYears(Min({1<DT=$::DT>}DT),-1))<=$(=AddYears(Max({1<DT=$::DT>}DT),-1))"}>}Sale)

 

replace DT, with your date field name

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
vinieme12
Champion III
Champion III

Hi ,

This is simply because there is ACTUALLY NO DATA for the selected brand "OFF" from 1-4Jan and 21-22 JAn

You can verify this in your dataset,  the calendar is simply showing possible dates for the brand selected

 

Once you remove the Brand Selection, your calendar will show your initial selection of 1- 22nd Jan

The missing dates that were selected initially are simply in "Selected Excluded" state because of the brand selection as there is no data for that brand for those dates

 

read more here

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Selections/selection-sta...

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
danimarc12
Partner - Creator
Partner - Creator
Author

Hi @vinieme12 , thanks for your answer.

In this way I cannot display the revenue from the 1st Jan to the 3th Jan of the previous year, so I cannot compare the revenue of this year with the revenue of the previous year . I have values of revenue in the PY from the 1st to the 3th Jan.

So, how can I solve my issue?

Thanks 🙏

vinieme12
Champion III
Champion III

"In this way I cannot display the revenue from the 1st Jan to the 3th Jan of the previous year, so I cannot compare the revenue of this year with the revenue of the previous year "

Previous period comparison is possible by way of set analysis,  it doesn't matter if you do not have data for all the dates of a comparing period

as I mentioned earlier the selections from 1Jan2023-22Jan2023 are in Selected Excluded state, so you can still use them as below

Selected Period

sum({<DT={">=$(=Date(Min({1<DT=$::DT>}DT)))<=$(=Date(Max({1<DT=$::DT>}DT)))"}>}Sale)

Previous Year Period

sum({<DT={">=$(=AddYears(Min({1<DT=$::DT>}DT),-1))<=$(=AddYears(Max({1<DT=$::DT>}DT),-1))"}>}Sale)

 

replace DT, with your date field name

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
danimarc12
Partner - Creator
Partner - Creator
Author

Great @vinieme12, it looks working! 😃

How can I set also the Date picker object correctly?

I mean, If I select from 1st to 22th Jan I would like that the Date Picker object shows from 1st to 22th ignoring the selected excluded.