Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I want to show 7 days data in line chart

Hi ,

Please help me

my data usgae_date= 20 Nov 00:00

i have used  = sum({<usage_date = {">=$(Max(usage_date,128))<=$(Max(usage_date))"},sla_id={3}>} txn_per_hour)

but not working.

i want to show on x axis 7 days data

10 Replies
sunny_talwar

What kind of format is this? 20 Nov 00:00? Is this Day Month Hour and Minute?

Anonymous
Not applicable
Author

in sql table format show date like this:2017-11-09 10:00:00  YYYY-MM-DD HH:MM:SS

but in data load editor show like this:2017 Nov 10:00 

sunny_talwar

May be the first step might be to make sure that date is read correctly... check these links to make sure that you are able to help Qlik read your date field as dates

Why don’t my dates work?

QlikView Date fields

Get the Dates Right

pradosh_thakur
Master II
Master II

use date() and date#() to format the data in the script itslef first. what is the default format for the date in your app?

Learning never stops.
Anonymous
Not applicable
Author

DD MMM HH:MM

pradosh_thakur
Master II
Master II

Is it the required format you want and dont want year to be included?

use a text box and print this = Max(usage_date,128) and =Max(usage_date) most probably it will return a number. If so use date() to convert them to date and use in set analysis .



regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

i want to show 7 day data on line chart.

when i select 30 day from filter then show 30 day data on linechart.

Anonymous
Not applicable
Author

but initially show 7 days data

i will try using below code in expression of line chart

if(IsNull(GetFieldSelections(PERIOD)),

sum({<usage_date = {">=$(=Timestamp(Max(usage_date)-7))<=$(=Timestamp(Max(usage_date)))"},sla_id={3}>} txn_per_hour),

sum({<usage_date = {">=$(=Timestamp(Max(usage_date)-PERIOD))<=$(=Timestamp(Max(usage_date)))"},sla_id={3}>} txn_per_hour))

but it is not work please help me.

Anil_Babu_Samineni

What are you trying with this? if(IsNull(GetFieldSelections(PERIOD)),

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful