Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
onetwothree123
Partner - Contributor III
Partner - Contributor III

Line chart Date Formatting

Hi,

In my line chart's expresion I am calculating trend using set analysis and limiting it to current date to 30 day's back (One month trend)

Current date selection is being made by a calendar object.

If user selects 5/24 line chart should populate 4/24-5/24.

I have all this working but my line chart is showing all the dates 4/24, 4/25 4/26 ............................ 5/24.

Requirment Questions:

1) just show  4/24 nothing in between and 5/24 at the end as in image below

2) Currently I have date in MM/DD/YYYY format (4/24/2012) how can I change it to just MM/DD format in the chart

14 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi,

1. can you post the expression you're using in the chart?

2. Do you have a Calendar table with all the possible date dimensions? If not, I'd recommend you to do it. In the Calendar table, you would create another field in this table using the date() function date(YourDateField, 'MM/DD'). Another option is to use a calculated dimension (using the same date() function), which is not really recommended because calculated dimensions may slow down the app performance.

Hope this helps you

regards,

Fernando

onetwothree123
Partner - Contributor III
Partner - Contributor III
Author

Here's the expression i'm using:

=Money(sum({< Date = {'>=$(=Date(vPriorMonthDate))<=$(=Date(VarCurrentDay))'} >} Balances_Daily_Deposits_Actual),'$#,##0.00')/1000000000

And I have master calendar in my script for date.

onetwothree123
Partner - Contributor III
Partner - Contributor III
Author

Is it possible to show just 4/24 and 5/24 and no dates in between ?

fosuzuki
Partner - Specialist III
Partner - Specialist III

The problem with your expression is that the set analysis is using a date range, and every data in that range will appear in the chart.

Maybe if you change your expression to:

Money(sum({< Date = {'$(=Date(vPriorMonthDate)), '$(=Date(VarCurrentDay))'} >} Balances_Daily_Deposits_Actual), '$#,##0.00') / 1000000000

The idea is that in the set analysis you'll use only the two dates, not the date range. Maybe you'll have to adjust the date format so that it works ok.

onetwothree123
Partner - Contributor III
Partner - Contributor III
Author

With your expression it says no data to display

fosuzuki
Partner - Specialist III
Partner - Specialist III

Try this:

Money(sum({< Date = {'$(=Date(vPriorMonthDate))', '$(=Date(VarCurrentDay))'} >} Balances_Daily_Deposits_Actual), '$#,##0.00') / 1000000000

onetwothree123
Partner - Contributor III
Partner - Contributor III
Author

Fernando,

I think you got my question wrong.

Idea is to have all the dates calculating in line chart but just display start and end date of the calculation

fosuzuki
Partner - Specialist III
Partner - Specialist III

Oh, now I understood. Sorry.

I think that you try doing this: Chart Properties>Axes>Dimension Axis>check the Continuous option.

onetwothree123
Partner - Contributor III
Partner - Contributor III
Author

with continuos option checked I have only one date displayed with amount of space I'm showing the line chart