Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Showing data quarterly from month data

Hi All,

PFA.

Below is the requirement.

When data for Jan,Feb ,Mar is present then make Jan+Feb+Mar for indicator value and show data for Q1 on march.

Similirly for Q2 on jun for Apr+May+jun

Q3 on sept for jul+aug+sept

And Q4 on dec for oct+Nov+Dec

If any month in any of quarter is not present then data for that quarter should not display

eg suppose for 2001  oct  is absent so Q4  that is dec for 2001 shoud not display.

I am using below fomula

=if(mod(Month(DATE),3) = 0, If(month(DATE) -1 = Month(Above(DATE)) and (month(DATE) -2) = Month(Above(Above(DATE))),

Above(Text)+Above(Above(Text))+ Sum(INDICATOR_VALUE)), Sum({<INDICATOR_NAME={'FRCOSTRT Index = France Housing Starts Total'},

MONTH={3,6,9,12}>}INDICATOR_VALUE)

)

and DATE is domension.

Req  is to show this in bar chart

18 Replies
sunny_talwar

Not sure why you have the last expression on failure of if(mod(Month(DATE),3) = 0, -> Sum({<INDICATOR_NAME={'FRCOSTRT Index = France Housing Starts Total'}, MONTH={3,6,9,12}>}INDICATOR_VALUE)

But this seems to add up the last three months of data:

=If(Mod(Month(DATE),3) = 0,

If(Month(DATE) -1 = Month(Above(DATE)) and

  (Month(DATE) -2) = Month(Above(Above(DATE))),

Above(Sum(INDICATOR_VALUE)) + Above(Above(Sum(INDICATOR_VALUE))) + Sum(INDICATOR_VALUE)))

Capture.PNG

With regards to October 2001 missing, I actually see the data. Is it after you make a selection in country the data is not present?

Capture.PNG

Let me know if I am moving in a completely wrong direction here.

Best,

Sunny

sunny_talwar

This?

Capture.PNG

Expression:

=If(Mod(Month(DATE),3) = 0,

If(Month(DATE) -1 = Month(Above(DATE)) and

  (Month(DATE) -2) = Month(Above(Above(DATE))),

Above(Sum({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE)) +

Above(Above(Sum({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE))) +

Sum({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE)))

qlikviewwizard
Master II
Master II

Hi Deepak,

Please close the thread by selecting Helpful/Correct Answer. Thank you.

sunny_talwar

Does this resolve the issue?

=If(Mod(Month(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)),3) = 0,

If(Month(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)) -1 = Month(Above(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE))) and

  (Month(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)) -2) = Month(Above(Above(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)))),

Above(Sum({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE)) +

Above(Above(Sum({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE))) +

Sum({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE)))

Output:


Capture.PNG

sunny_talwar

Deepak I see two values on a single date, how are you planning to handle these? For example: 3/31/2015 and 6/30/2015 are repeating with different values.

Capture.PNG

deepakqlikview_123
Specialist
Specialist
Author

that is data issue

sunny_talwar

Yet another attempt

Expression:

=If(Mod(Month(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)),3) = 0,

If(Month(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)) -1 = Month(Above(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE))) and

  (Month(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)) -2) = Month(Above(Above(Only({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}DATE)))),

Above(Max({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}Aggr(Max({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE), DATE))) +

Above(Above(Max({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}Aggr(Max({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE), DATE)))) +

Max({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}Aggr(Max({<INDICATOR_NAME = {'FRCOSTRT Index = France Housing Starts Total'}>}INDICATOR_VALUE), DATE))))

Output:

Capture.PNG

deepakqlikview_123
Specialist
Specialist
Author

Hi Sunny,

On mouse hover selection it showing no data to display.

IT has to show atleast selected bars.

Please suggest

deepakqlikview_123
Specialist
Specialist
Author

jagan‌ can you please suggest on  this.