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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
shwethaa
Contributor III
Contributor III

line chart calculation on date and display string in x axis

How to display line chart based on date dimension but display string calculated from date in x axis?

 

Eg- If date is from 1/1/2018 to 1/7/2018.

It should display day1,day2 ,day3 in x axis.

But sales calculation should be for Date.

 

if user selects 2 date range like 1/1/2018 to 1/7/2018

and 1/14/2018 to 1/21/2018. Then 1/1/2018 and 1/14/2018 as day 1.

there should be 2 lines. 1 line corespong to 1/1/2018. 2nd line should display value for 1/7/2018

Labels (1)
1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

For the first line, you could try these for a calculated dimension:

'day' & Num(date - Min(Total(date)))
or
Aggr('day' & Num(date - Min(Total(date))), date)

The second line is more of a problem. To do this you may need to explore data islands, an as-of table and/or alternate states.

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