Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Displaying all the data in the chart when selecting calendar object

Hi,

I have a requirement where in there are 2 calendar objects ,start date and end date.The data is stored as 1st of every month in the start date and 30/31st of every month .When i select 1st of any month in the start date i will be getting data in the straight table which displays the records but when i select 2nd or 3rd of jan then i will not be getting any data for that whole month of jan.

Is there any way to select any date in that month as start date and any month as end data,that month data should reflect in the chart?

1 Solution

Accepted Solutions
MVP
MVP

Re: Displaying all the data in the chart when selecting calendar object

If you create the calendar objects on the variables vFromDate and vToDate, then you could ensure complete months by something like:

=Sum({<[Start Date] = {">=$(=MonthStart(vFromDate))<=$(=MonthEnd(vToDate))"}>} [PWR Actual Effort])

I am not sure why you need the Aggr() in your expression, soI have not included it above.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
10 Replies
qlikdeez
Valued Contributor

Re: Displaying all the data in the chart when selecting calendar object

Can you post sample data or an app so that we can assist and better understand your requirements.

Not applicable

Re: Displaying all the data in the chart when selecting calendar object

Sorry ,its confidential data so i cannot post the same here .Pls let me know if there is any option of assigning the data to whole month if the data is present on 1st of every month.

qlikdeez
Valued Contributor

Re: Displaying all the data in the chart when selecting calendar object

Create sample data is able to demonstrate the issue you are facing..

Could be inline statements and a generic calendar that is not sensative.

Checkout this post:

Uploading a Sample

Not applicable

Re: Displaying all the data in the chart when selecting calendar object

jagan‌ , marcus_sommer‌ , marcowedel‌ could you please help in the query

I have a requirement where in there are 2 calendar objects ,start date and end date.The data is stored as 1st of every month in the start date and 30/31st of every month in the end date .When i select 1st of any month in the start date i will be getting data in the straight table which displays the records but when i select 2nd or 3rd of jan then i will not be getting any data for that whole month of jan.

Is there any way to select any date in that month as start date and any month as end data,that month data should reflect in the chart?

MVP
MVP

Re: Displaying all the data in the chart when selecting calendar object

Hi Rekha,

Can you post the expression that you are using so that it is easier to understand and provide solution.  Anyway try below expression

=Sum({<StartDate={'>=$(=MonthStart(Max(StartDate)))<=$(=MonthEnd(Max(StartDate)))'}>} MeasureName)

Note: Replace StartDate and MeasureName with corresponding field names.

Regards,

Jagan.

kalyanivintha1
Contributor II

Re: Displaying all the data in the chart when selecting calendar object

Hi,

i think you have to reflect your straight table data according to calendar objects(with start date and end date).

suppose.,

if you created normal calendar objects with min and max values.

in that,

if you select any date in that month as start date and any month as end date,that month data should reflect in the chart at any cost.

and

if you created calendar objects with any calculations,

based on your condition it is going for selections,


i think you have to check you calendar object min and max ranges,if you have any calculated values in min and max values range change these,

then your calendar objects going for selection with all values in every month.

and then check your straight table,

is there any calculated conditions change according to requirement.


Thanq.

Not applicable

Re: Displaying all the data in the chart when selecting calendar object

Hi Jagan,

Am using the below expression in my straight table.

=if([Start Date]>=vminstartdate and [Start Date]<vmaxenddate, sum(aggr( [PWR Actual Effort],[Name],Resource,[PW Fiscal Year],[Month/Year]))).

vminstartdate i have defined it as min(startdate)

vmaxenddate i have defined it as max(startdate).

The first calendar object from date is defined as variable=vminstartdate and min value as min(startdate) and max value as max(startdate)

similarly for to date have defined the variable=vmaxstartdate and min value as min(startdate) and max value as max(startdate).


I am considering the same expression as yours in if statement  but the problem is if i click on jan1st date as fromdate then i will get data,but if i click on jan2nd then the data in the straight table for jan will vanish.i would want to click on any date in month of jan in from date and i should be getting the value ,similarly if i click on any date in that month in todate i should be getting data.am getting stuck like how can we assign value of one date to the whole month so that any date i click in that month i should be getting the same data.

Capture.PNG

MVP
MVP

Re: Displaying all the data in the chart when selecting calendar object

If you create the calendar objects on the variables vFromDate and vToDate, then you could ensure complete months by something like:

=Sum({<[Start Date] = {">=$(=MonthStart(vFromDate))<=$(=MonthEnd(vToDate))"}>} [PWR Actual Effort])

I am not sure why you need the Aggr() in your expression, soI have not included it above.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MVP
MVP

Re: Displaying all the data in the chart when selecting calendar object

I think you don't have values for 2nd Jan.  Try like this

vminstartdate i have defined it as Monthstart(min(startdate))


Regards,

Jagan.

Community Browser